starts moving alarm sync logic to alarmables

This commit is contained in:
vulppine
2022-08-20 07:36:53 -07:00
parent 8878c0d8a6
commit a2d18e7a6d
5 changed files with 183 additions and 79 deletions

View File

@@ -19,7 +19,10 @@ namespace Content.Server.Atmos.Monitor.Components
/// <summary>
/// A component to add to device network devices if you want them to be alarmed
/// by an atmospheric monitor.
/// by an atmospheric alarmer. This will store every single alert received, and
/// calculate the highest alert based on the alerts received. Equally, if you
/// link other alarmables to this, it will store the alerts from them to
/// calculate the highest network alert.
/// </summary>
[RegisterComponent]
public sealed class AtmosAlarmableComponent : Component
@@ -27,6 +30,9 @@ namespace Content.Server.Atmos.Monitor.Components
[ViewVariables]
public List<EntityUid> LinkedMonitors { get; set; } = new();
[ViewVariables]
public Dictionary<string, AtmosMonitorAlarmType> NetworkAlarmStates = new();
[ViewVariables] public AtmosMonitorAlarmType LastAlarmState = AtmosMonitorAlarmType.Normal;
[ViewVariables] public AtmosMonitorAlarmType HighestNetworkState = AtmosMonitorAlarmType.Normal;
[ViewVariables] public bool IgnoreAlarms { get; set; } = false;