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:
Flipp Syder
2022-05-05 19:35:06 -07:00
committed by GitHub
parent 39a35641ab
commit 2c6158e115
51 changed files with 2656 additions and 1660 deletions

View 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; }
}