using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set; using Robust.Shared.Timing; namespace Content.Shared.DeviceLinking; [RegisterComponent] [NetworkedComponent] // for interactions. Actual state isn't currently synced. [Access(typeof(SharedDeviceLinkSystem))] public sealed partial class DeviceLinkSinkComponent : Component { /// /// The ports this sink has /// [DataField] public HashSet> Ports = new(); /// /// Used for removing a sink from all linked sources when this component gets removed. /// This is not serialized to yaml as it can be inferred from source components. /// [ViewVariables] public HashSet LinkedSources = new(); /// /// The tick was set at. Used to calculate the real value for the current tick. /// [Access(typeof(SharedDeviceLinkSystem), Other = AccessPermissions.None)] public GameTick InvokeCounterTick; /// /// Counter used to throttle device invocations to avoid infinite loops. /// /// /// This is stored relative to . For reading the real value, /// should be used. /// [DataField] [Access(typeof(SharedDeviceLinkSystem), Other = AccessPermissions.None)] public int InvokeCounter; /// /// How high the invoke counter is allowed to get before the links to the sink are removed and the DeviceLinkOverloadedEvent gets raised /// If the invoke limit is smaller than 1 the sink can't overload /// [DataField] public int InvokeLimit = 10; }