power check for firelocks, atmos monitor power cycle should now alert

This commit is contained in:
vulppine
2022-08-22 16:47:34 -07:00
parent 069ea2e315
commit 7fd510d252
2 changed files with 6 additions and 0 deletions

View File

@@ -160,6 +160,8 @@ namespace Content.Server.Atmos.Monitor.Systems
var air = _atmosphereSystem.GetContainingMixture(uid, true); var air = _atmosphereSystem.GetContainingMixture(uid, true);
component.TileGas = air; component.TileGas = air;
} }
Alert(uid, component.LastAlarmState);
} }
} }
} }

View File

@@ -1,6 +1,7 @@
using Content.Server.Atmos.Monitor.Components; using Content.Server.Atmos.Monitor.Components;
using Content.Server.Atmos.Monitor.Systems; using Content.Server.Atmos.Monitor.Systems;
using Content.Server.Doors.Components; using Content.Server.Doors.Components;
using Content.Server.Power.EntitySystems;
using Content.Shared.Atmos.Monitor; using Content.Shared.Atmos.Monitor;
using Content.Shared.Doors; using Content.Shared.Doors;
using Content.Shared.Doors.Components; using Content.Shared.Doors.Components;
@@ -76,6 +77,9 @@ namespace Content.Server.Doors.Systems
private void OnBeforeDoorAutoclose(EntityUid uid, FirelockComponent component, BeforeDoorAutoCloseEvent args) private void OnBeforeDoorAutoclose(EntityUid uid, FirelockComponent component, BeforeDoorAutoCloseEvent args)
{ {
if (!this.IsPowered(uid, EntityManager))
args.Cancel();
// Make firelocks autoclose, but only if the last alarm type it // Make firelocks autoclose, but only if the last alarm type it
// remembers was a danger. This is to prevent people from // remembers was a danger. This is to prevent people from
// flooding hallways with endless bad air/fire. // flooding hallways with endless bad air/fire.