Machine Linking Overhaul (#7160)

This commit is contained in:
Jack Fox
2022-04-04 01:13:03 -05:00
committed by GitHub
parent fd7ea3f1e7
commit f957c58906
40 changed files with 605 additions and 696 deletions

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using Content.Server.MachineLinking.Models;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
@@ -11,9 +10,14 @@ namespace Content.Server.MachineLinking.Components
public sealed class SignalReceiverComponent : Component
{
[DataField("inputs")]
private List<SignalPort> _inputs = new();
private Dictionary<string, List<PortIdentifier>> _inputs = new();
public void AddPort(string name)
{
_inputs.Add(name, new());
}
[ViewVariables]
public IReadOnlyList<SignalPort> Inputs => _inputs;
public IReadOnlyDictionary<string, List<PortIdentifier>> Inputs => _inputs;
}
}