Machine Port Prototypes (#7659)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Leon Friedrich
2022-05-12 20:46:20 +12:00
committed by GitHub
parent 32c2eb7a02
commit c00b459e31
29 changed files with 422 additions and 220 deletions

View File

@@ -1,23 +1,12 @@
using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
using Content.Server.MachineLinking.System;
namespace Content.Server.MachineLinking.Components
{
[RegisterComponent]
[Friend(typeof(SignalLinkerSystem))]
public sealed class SignalReceiverComponent : Component
{
[DataField("inputs")]
private Dictionary<string, List<PortIdentifier>> _inputs = new();
public void AddPort(string name)
{
_inputs.Add(name, new());
}
[ViewVariables]
public IReadOnlyDictionary<string, List<PortIdentifier>> Inputs => _inputs;
public Dictionary<string, List<PortIdentifier>> Inputs = new();
}
}