vv for tripped thresholds, device list update event for air alarms
This commit is contained in:
@@ -59,7 +59,7 @@ namespace Content.Server.Atmos.Monitor.Components
|
||||
[ViewVariables]
|
||||
public AtmosMonitorAlarmType LastAlarmState = AtmosMonitorAlarmType.Normal;
|
||||
|
||||
public HashSet<AtmosMonitorThresholdType> TrippedThresholds = new();
|
||||
[ViewVariables] public HashSet<AtmosMonitorThresholdType> TrippedThresholds = new();
|
||||
|
||||
/// <summary>
|
||||
/// Registered devices in this atmos monitor. Alerts will be sent directly
|
||||
|
||||
@@ -159,11 +159,17 @@ namespace Content.Server.Atmos.Monitor.Systems
|
||||
SubscribeLocalEvent<AirAlarmComponent, AirAlarmUpdateAlarmThresholdMessage>(OnUpdateThreshold);
|
||||
SubscribeLocalEvent<AirAlarmComponent, AirAlarmUpdateDeviceDataMessage>(OnUpdateDeviceData);
|
||||
SubscribeLocalEvent<AirAlarmComponent, AirAlarmTabSetMessage>(OnTabChange);
|
||||
SubscribeLocalEvent<AirAlarmComponent, DeviceListUpdateEvent>(OnDeviceListUpdate);
|
||||
SubscribeLocalEvent<AirAlarmComponent, BoundUIClosedEvent>(OnClose);
|
||||
SubscribeLocalEvent<AirAlarmComponent, ComponentShutdown>(OnShutdown);
|
||||
SubscribeLocalEvent<AirAlarmComponent, InteractHandEvent>(OnInteract);
|
||||
}
|
||||
|
||||
private void OnDeviceListUpdate(EntityUid uid, AirAlarmComponent component, DeviceListUpdateEvent args)
|
||||
{
|
||||
SyncRegisterAllDevices(uid);
|
||||
}
|
||||
|
||||
private void OnTabChange(EntityUid uid, AirAlarmComponent component, AirAlarmTabSetMessage msg)
|
||||
{
|
||||
component.CurrentTab = msg.Tab;
|
||||
|
||||
Reference in New Issue
Block a user