using Content.Server.DeviceLinking.Components; using Content.Shared.Atmos.Monitor; using Content.Shared.Atmos.Monitor.Components; using Content.Shared.Atmos.Piping.Unary.Components; using Content.Shared.DeviceLinking; using Robust.Shared.Network; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.Atmos.Monitor.Components; [RegisterComponent] public sealed partial class AirAlarmComponent : Component { [ViewVariables] public AirAlarmMode CurrentMode { get; set; } = AirAlarmMode.Filtering; [ViewVariables] public bool AutoMode { get; set; } = true; // Remember to null this afterwards. [ViewVariables] public IAirAlarmModeUpdate? CurrentModeUpdater { get; set; } [ViewVariables] public AirAlarmTab CurrentTab { get; set; } public readonly HashSet KnownDevices = new(); public readonly Dictionary VentData = new(); public readonly Dictionary ScrubberData = new(); public readonly Dictionary SensorData = new(); public bool CanSync = true; /// /// Previous alarm state for use with output ports. /// [DataField("state")] public AtmosAlarmType State = AtmosAlarmType.Normal; /// /// The port that gets set to high while the alarm is in the danger state, and low when not. /// [DataField("dangerPort", customTypeSerializer: typeof(PrototypeIdSerializer))] public string DangerPort = "AirDanger"; /// /// The port that gets set to high while the alarm is in the warning state, and low when not. /// [DataField("warningPort", customTypeSerializer: typeof(PrototypeIdSerializer))] public string WarningPort = "AirWarning"; /// /// The port that gets set to high while the alarm is in the normal state, and low when not. /// [DataField("normalPort", customTypeSerializer: typeof(PrototypeIdSerializer))] public string NormalPort = "AirNormal"; }