1
0

BodyPrototype.cs 861 B

1234567891011121314151617181920212223242526272829
  1. using Robust.Shared.Prototypes;
  2. namespace Content.Shared.Body.Prototypes;
  3. [Prototype]
  4. public sealed partial class BodyPrototype : IPrototype
  5. {
  6. [IdDataField] public string ID { get; private set; } = default!;
  7. [DataField("name")]
  8. public string Name { get; private set; } = "";
  9. [DataField("root")] public string Root { get; private set; } = string.Empty;
  10. [DataField("slots")] public Dictionary<string, BodyPrototypeSlot> Slots { get; private set; } = new();
  11. private BodyPrototype() { }
  12. public BodyPrototype(string id, string name, string root, Dictionary<string, BodyPrototypeSlot> slots)
  13. {
  14. ID = id;
  15. Name = name;
  16. Root = root;
  17. Slots = slots;
  18. }
  19. }
  20. [DataRecord]
  21. public sealed partial record BodyPrototypeSlot(EntProtoId? Part, HashSet<string> Connections, Dictionary<string, string> Organs);