2021-08-27 17:46:02 +02:00
|
|
|
|
using System;
|
2021-06-21 02:13:54 +02:00
|
|
|
|
using System.Collections.Generic;
|
2020-08-29 03:33:42 -07:00
|
|
|
|
using Robust.Shared.GameObjects;
|
2021-03-05 01:08:38 +01:00
|
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-08-27 17:46:02 +02:00
|
|
|
|
using Robust.Shared.ViewVariables;
|
2020-08-29 03:33:42 -07:00
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
|
namespace Content.Server.MachineLinking.Components
|
2020-08-29 03:33:42 -07:00
|
|
|
|
{
|
|
|
|
|
|
[RegisterComponent]
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class SignalReceiverComponent : Component
|
2020-08-29 03:33:42 -07:00
|
|
|
|
{
|
2021-08-27 17:46:02 +02:00
|
|
|
|
[DataField("inputs")]
|
2022-04-04 01:13:03 -05:00
|
|
|
|
private Dictionary<string, List<PortIdentifier>> _inputs = new();
|
|
|
|
|
|
|
|
|
|
|
|
public void AddPort(string name)
|
|
|
|
|
|
{
|
|
|
|
|
|
_inputs.Add(name, new());
|
|
|
|
|
|
}
|
2020-08-29 03:33:42 -07:00
|
|
|
|
|
2021-08-27 17:46:02 +02:00
|
|
|
|
[ViewVariables]
|
2022-04-04 01:13:03 -05:00
|
|
|
|
public IReadOnlyDictionary<string, List<PortIdentifier>> Inputs => _inputs;
|
2020-08-29 03:33:42 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|