Adds a power check to OnAtmosAlarm for firelocks (#11369)

* firelocks when alarmed will now use tryclose instead of emergencypressurestop

* just adds a power check to OnAtmosAlarm, instead

* restores emergencypressurestop usage, adds a newline to an if
This commit is contained in:
Flipp Syder
2022-09-16 22:34:52 -07:00
committed by GitHub
parent 6ac4c38263
commit 3d3de873ff

View File

@@ -156,7 +156,11 @@ namespace Content.Server.Doors.Systems
private void OnAtmosAlarm(EntityUid uid, FirelockComponent component, AtmosAlarmEvent args)
{
if (!TryComp<DoorComponent>(uid, out var doorComponent)) return;
if (!this.IsPowered(uid, EntityManager))
return;
if (!TryComp<DoorComponent>(uid, out var doorComponent))
return;
if (args.AlarmType == AtmosAlarmType.Normal || args.AlarmType == AtmosAlarmType.Warning)
{