PartAssemblyComponent.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Robust.Shared.Containers;
  2. namespace Content.Shared.Construction.Components;
  3. /// <summary>
  4. /// This is used for construction which requires a set of
  5. /// entities with specific tags to be inserted into another entity.
  6. /// todo: in a pr that isn't 6k loc, combine this with MechAssemblyComponent
  7. /// </summary>
  8. [RegisterComponent]
  9. public sealed partial class PartAssemblyComponent : Component
  10. {
  11. /// <summary>
  12. /// A dictionary of a set of parts to a list of tags for each assembly.
  13. /// </summary>
  14. [DataField("parts", required: true)]
  15. public Dictionary<string, List<string>> Parts = new();
  16. /// <summary>
  17. /// The entry in <see cref="Parts"/> that is currently being worked on.
  18. /// </summary>
  19. [DataField("currentAssembly")]
  20. public string? CurrentAssembly;
  21. /// <summary>
  22. /// The container where the parts are stored
  23. /// </summary>
  24. [DataField("containerId")]
  25. public string ContainerId = "part-container";
  26. /// <summary>
  27. /// The container that stores all of the parts when
  28. /// they're being assembled.
  29. /// </summary>
  30. [ViewVariables]
  31. public Container PartsContainer = default!;
  32. }
  33. /// <summary>
  34. /// Event raised when a valid part is inserted into the part assembly.
  35. /// </summary>
  36. public sealed class PartAssemblyPartInsertedEvent
  37. {
  38. }