Files
wwdpublic/Content.Shared/Chemistry/Components/SolutionManager/SolutionContainerManagerComponent.cs
Nemanja 5a978c0430 Fix chem sources in guidebook (#23987)
* Fix chem sources in guidebook

* shabooya

(cherry picked from commit 0e45c63d2289387cbe3abc85665225fb2cfb114e)
2024-01-26 22:35:05 +01:00

37 lines
1.4 KiB
C#

using Content.Shared.Chemistry.EntitySystems;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
namespace Content.Shared.Chemistry.Components.SolutionManager;
/// <summary>
/// <para>A map of the solution entities contained within this entity.</para>
/// <para>Every solution entity this maps should have a <see cref="SolutionComponent"/> to track its state and a <see cref="ContainedSolutionComponent"/> to track its container.</para>
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedSolutionContainerSystem))]
public sealed partial class SolutionContainerManagerComponent : Component
{
/// <summary>
/// The default amount of space that will be allocated for solutions in solution containers.
/// Most solution containers will only contain 1-2 solutions.
/// </summary>
public const int DefaultCapacity = 2;
/// <summary>
/// The names of each solution container attached to this entity.
/// Actually accessing them must be done via <see cref="ContainerManagerComponent"/>.
/// </summary>
[DataField, AutoNetworkedField]
public HashSet<string> Containers = new(DefaultCapacity);
/// <summary>
/// The set of solutions to load onto this entity during mapinit.
/// </summary>
/// <remarks>
/// Should be null after mapinit.
/// </remarks>
[DataField, AutoNetworkedField]
public Dictionary<string, Solution>? Solutions = null;
}