air alarm signal ports and other stuff (#18642)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
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;
|
||||
|
||||
@@ -24,4 +27,28 @@ public sealed class AirAlarmComponent : Component
|
||||
public HashSet<NetUserId> ActivePlayers = new();
|
||||
|
||||
public bool CanSync = true;
|
||||
|
||||
/// <summary>
|
||||
/// Previous alarm state for use with output ports.
|
||||
/// </summary>
|
||||
[DataField("state")]
|
||||
public AtmosAlarmType State = AtmosAlarmType.Normal;
|
||||
|
||||
/// <summary>
|
||||
/// The port that gets set to high while the alarm is in the danger state, and low when not.
|
||||
/// </summary>
|
||||
[DataField("dangerPort", customTypeSerializer: typeof(PrototypeIdSerializer<SourcePortPrototype>))]
|
||||
public string DangerPort = "AirDanger";
|
||||
|
||||
/// <summary>
|
||||
/// The port that gets set to high while the alarm is in the warning state, and low when not.
|
||||
/// </summary>
|
||||
[DataField("warningPort", customTypeSerializer: typeof(PrototypeIdSerializer<SourcePortPrototype>))]
|
||||
public string WarningPort = "AirWarning";
|
||||
|
||||
/// <summary>
|
||||
/// The port that gets set to high while the alarm is in the normal state, and low when not.
|
||||
/// </summary>
|
||||
[DataField("normalPort", customTypeSerializer: typeof(PrototypeIdSerializer<SourcePortPrototype>))]
|
||||
public string NormalPort = "AirNormal";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user