ContainedSolutionComponent.cs 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. using Content.Shared.Chemistry.EntitySystems;
  2. using Robust.Shared.GameStates;
  3. using Robust.Shared.Serialization;
  4. namespace Content.Shared.Chemistry.Components.SolutionManager;
  5. /// <summary>
  6. /// Component used to relate a solution to its container.
  7. /// </summary>
  8. /// <remarks>
  9. /// When containers are finally ECS'd have this attach to the container entity.
  10. /// The <see cref="Solution.MaxVolume"/> field should then be extracted out into this component.
  11. /// Solution entities would just become an apporpriately composed entity hanging out in the container.
  12. /// Will probably require entities in components being given a relation to associate themselves with their container.
  13. /// </remarks>
  14. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  15. [Access(typeof(SharedSolutionContainerSystem))]
  16. public sealed partial class ContainedSolutionComponent : Component
  17. {
  18. /// <summary>
  19. /// The entity that the solution is contained in.
  20. /// </summary>
  21. [DataField(required: true), AutoNetworkedField]
  22. public EntityUid Container;
  23. /// <summary>
  24. /// The name/key of the container the solution is located in.
  25. /// </summary>
  26. [DataField(required: true), AutoNetworkedField]
  27. public string ContainerName = default!;
  28. }