renames AtmosMonitorAlarmEvent to AtmosAlarmEvent
This commit is contained in:
@@ -152,7 +152,7 @@ namespace Content.Server.Atmos.Monitor.Systems
|
||||
{
|
||||
SubscribeLocalEvent<AirAlarmComponent, DeviceNetworkPacketEvent>(OnPacketRecv);
|
||||
SubscribeLocalEvent<AirAlarmComponent, AtmosDeviceUpdateEvent>(OnAtmosUpdate);
|
||||
SubscribeLocalEvent<AirAlarmComponent, AtmosMonitorAlarmEvent>(OnAtmosAlarm);
|
||||
SubscribeLocalEvent<AirAlarmComponent, AtmosAlarmEvent>(OnAtmosAlarm);
|
||||
SubscribeLocalEvent<AirAlarmComponent, PowerChangedEvent>(OnPowerChanged);
|
||||
SubscribeLocalEvent<AirAlarmComponent, AirAlarmResyncAllDevicesMessage>(OnResyncAll);
|
||||
SubscribeLocalEvent<AirAlarmComponent, AirAlarmUpdateAlarmModeMessage>(OnUpdateAlarmMode);
|
||||
@@ -283,7 +283,7 @@ namespace Content.Server.Atmos.Monitor.Systems
|
||||
return true;
|
||||
}
|
||||
|
||||
private void OnAtmosAlarm(EntityUid uid, AirAlarmComponent component, AtmosMonitorAlarmEvent args)
|
||||
private void OnAtmosAlarm(EntityUid uid, AirAlarmComponent component, AtmosAlarmEvent args)
|
||||
{
|
||||
if (component.ActivePlayers.Count != 0)
|
||||
{
|
||||
@@ -294,11 +294,11 @@ namespace Content.Server.Atmos.Monitor.Systems
|
||||
if (EntityManager.TryGetComponent(uid, out DeviceNetworkComponent? netConn)) addr = netConn.Address;
|
||||
|
||||
|
||||
if (args.HighestNetworkType == AtmosMonitorAlarmType.Danger)
|
||||
if (args.AlarmType == AtmosMonitorAlarmType.Danger)
|
||||
{
|
||||
SetMode(uid, addr, AirAlarmMode.None, true, false);
|
||||
}
|
||||
else if (args.HighestNetworkType == AtmosMonitorAlarmType.Normal)
|
||||
else if (args.AlarmType == AtmosMonitorAlarmType.Normal)
|
||||
{
|
||||
SetMode(uid, addr, AirAlarmMode.Filtering, true, false);
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace Content.Server.Atmos.Monitor.Systems
|
||||
alarmable.LastAlarmState = type;
|
||||
UpdateAppearance(uid, type);
|
||||
PlayAlertSound(uid, type, alarmable);
|
||||
RaiseLocalEvent(uid, new AtmosMonitorAlarmEvent(type, type), true);
|
||||
RaiseLocalEvent(uid, new AtmosAlarmEvent(type), true);
|
||||
}
|
||||
|
||||
public void SyncAlertsToNetwork(EntityUid uid, string? address = null, AtmosAlarmableComponent? alarmable = null, TagComponent? tags = null)
|
||||
@@ -294,4 +294,14 @@ namespace Content.Server.Atmos.Monitor.Systems
|
||||
_appearance.SetData(uid, AtmosMonitorVisuals.AlarmType, alarm);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class AtmosAlarmEvent : EntityEventArgs
|
||||
{
|
||||
public AtmosMonitorAlarmType AlarmType { get; }
|
||||
|
||||
public AtmosAlarmEvent(AtmosMonitorAlarmType netMax)
|
||||
{
|
||||
AlarmType = netMax;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -380,16 +380,4 @@ namespace Content.Server.Atmos.Monitor.Systems
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class AtmosMonitorAlarmEvent : EntityEventArgs
|
||||
{
|
||||
public AtmosMonitorAlarmType Type { get; }
|
||||
public AtmosMonitorAlarmType HighestNetworkType { get; }
|
||||
|
||||
public AtmosMonitorAlarmEvent(AtmosMonitorAlarmType type, AtmosMonitorAlarmType netMax)
|
||||
{
|
||||
Type = type;
|
||||
HighestNetworkType = netMax;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user