changes how the emag function works in fire alarms
This commit is contained in:
@@ -55,14 +55,11 @@ public sealed class FireAlarmSystem : EntitySystem
|
|||||||
|
|
||||||
private void OnEmagged(EntityUid uid, FireAlarmComponent component, GotEmaggedEvent args)
|
private void OnEmagged(EntityUid uid, FireAlarmComponent component, GotEmaggedEvent args)
|
||||||
{
|
{
|
||||||
if (TryComp<AtmosMonitorComponent>(uid, out var atmosMonitor))
|
if (TryComp<AtmosAlarmableComponent>(uid, out var alarmable))
|
||||||
{
|
{
|
||||||
if (atmosMonitor?.MonitorFire == true)
|
// Remove the atmos alarmable component permanently from this device.
|
||||||
{
|
_atmosAlarmable.ForceAlert(uid, AtmosMonitorAlarmType.Emagged, alarmable);
|
||||||
atmosMonitor.MonitorFire = false;
|
RemCompDeferred<AtmosAlarmableComponent>(uid);
|
||||||
_atmosAlarmable.ForceAlert(uid, AtmosMonitorAlarmType.Emagged);
|
|
||||||
args.Handled = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user