2023-10-14 09:45:28 -07:00
using Content.Shared.Chemistry.EntitySystems ;
2023-12-29 04:47:43 -08:00
using Robust.Shared.Containers ;
using Robust.Shared.GameStates ;
2023-10-14 09:45:28 -07:00
namespace Content.Shared.Chemistry.Components.SolutionManager ;
2023-12-29 04:47:43 -08:00
/// <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))]
2023-10-14 09:45:28 -07:00
public sealed partial class SolutionContainerManagerComponent : Component
{
2023-12-29 04:47:43 -08:00
/// <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>
2024-01-13 02:16:47 -05:00
[DataField, AutoNetworkedField]
2023-12-29 04:47:43 -08:00
public Dictionary < string , Solution > ? Solutions = null ;
2023-10-14 09:45:28 -07:00
}