Wires refactor (#7699)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
38
Content.Server/Wires/WireLayout.cs
Normal file
38
Content.Server/Wires/WireLayout.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.Wires;
|
||||
|
||||
/// <summary>
|
||||
/// WireLayout prototype.
|
||||
///
|
||||
/// This is meant for ease of organizing wire sets on entities that use
|
||||
/// wires. Once one of these is initialized, it should be stored in the
|
||||
/// WiresSystem as a functional wire set.
|
||||
/// </summary>
|
||||
[Prototype("wireLayout")]
|
||||
public sealed class WireLayoutPrototype : IPrototype, IInheritingPrototype
|
||||
{
|
||||
[IdDataFieldAttribute]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
[ParentDataField(typeof(AbstractPrototypeIdSerializer<WireLayoutPrototype>))]
|
||||
public string? Parent { get; } = default!;
|
||||
|
||||
[AbstractDataField]
|
||||
public bool Abstract { get; }
|
||||
|
||||
/// <summary>
|
||||
/// How many wires in this layout will do
|
||||
/// nothing (these are added upon layout
|
||||
/// initialization)
|
||||
/// </summary>
|
||||
[DataField("dummyWires")]
|
||||
public int DummyWires { get; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// All the valid IWireActions currently in this layout.
|
||||
/// </summary>
|
||||
[DataField("wires")]
|
||||
public List<IWireAction>? Wires { get; }
|
||||
}
|
||||
Reference in New Issue
Block a user