1
0

WireLayout.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Robust.Shared.Prototypes;
  2. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
  3. namespace Content.Server.Wires;
  4. /// <summary>
  5. /// WireLayout prototype.
  6. ///
  7. /// This is meant for ease of organizing wire sets on entities that use
  8. /// wires. Once one of these is initialized, it should be stored in the
  9. /// WiresSystem as a functional wire set.
  10. /// </summary>
  11. [Prototype]
  12. public sealed partial class WireLayoutPrototype : IPrototype, IInheritingPrototype
  13. {
  14. [IdDataField]
  15. public string ID { get; private set; } = default!;
  16. [ParentDataField(typeof(AbstractPrototypeIdArraySerializer<WireLayoutPrototype>))]
  17. public string[]? Parents { get; private set; }
  18. [AbstractDataField]
  19. public bool Abstract { get; private set; }
  20. /// <summary>
  21. /// How many wires in this layout will do
  22. /// nothing (these are added upon layout
  23. /// initialization)
  24. /// </summary>
  25. [DataField("dummyWires")]
  26. [NeverPushInheritance]
  27. public int DummyWires { get; private set; } = default!;
  28. /// <summary>
  29. /// All the valid IWireActions currently in this layout.
  30. /// </summary>
  31. [DataField("wires")]
  32. [NeverPushInheritance]
  33. public List<IWireAction>? Wires { get; private set; }
  34. }