Air alarm patches (#11004)

This commit is contained in:
Flipp Syder
2022-09-04 02:04:15 -07:00
committed by GitHub
parent ff61bc12a4
commit d447b0f80e
7 changed files with 31 additions and 18 deletions

View File

@@ -178,19 +178,17 @@ public sealed class AirAlarmSystem : EntitySystem
private void OnPowerChanged(EntityUid uid, AirAlarmComponent component, PowerChangedEvent args)
{
if (!args.Powered)
if (args.Powered)
{
ForceCloseAllInterfaces(uid);
component.CurrentModeUpdater = null;
component.KnownDevices.Clear();
component.ScrubberData.Clear();
component.SensorData.Clear();
component.VentData.Clear();
}
else
{
SyncAllDevices(uid);
return;
}
ForceCloseAllInterfaces(uid);
component.CurrentModeUpdater = null;
component.KnownDevices.Clear();
component.ScrubberData.Clear();
component.SensorData.Clear();
component.VentData.Clear();
}
private void OnClose(EntityUid uid, AirAlarmComponent component, BoundUIClosedEvent args)