using Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared.DeviceLinking; [RegisterComponent] [NetworkedComponent] // for interactions. Actual state isn't currently synced. [Access(typeof(SharedDeviceLinkSystem))] public sealed partial class DeviceLinkSourceComponent : Component { /// /// The ports the device link source sends signals from /// [DataField] public HashSet>? Ports; /// /// A list of sink uids that got linked for each port /// [ViewVariables] public Dictionary, HashSet> Outputs = new(); /// /// If set to High or Low, the last signal state for a given port. /// Used when linking ports of devices that are currently outputting a signal. /// Only set by DeviceLinkSystem.SendSignal. /// [DataField] public Dictionary, bool> LastSignals = new(); /// /// The list of source to sink ports for each linked sink entity for easier managing of links /// [DataField] public Dictionary source, ProtoId sink)>> LinkedPorts = new(); /// /// Limits the range devices can be linked across. /// [DataField] public float Range = 30f; }