From 7fd510d252e75f19b64430e551e8589f5bbadaa4 Mon Sep 17 00:00:00 2001 From: vulppine Date: Mon, 22 Aug 2022 16:47:34 -0700 Subject: [PATCH] power check for firelocks, atmos monitor power cycle should now alert --- Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs | 2 ++ Content.Server/Doors/Systems/FirelockSystem.cs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs b/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs index 2b9b36656b..5641164a03 100644 --- a/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs +++ b/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs @@ -160,6 +160,8 @@ namespace Content.Server.Atmos.Monitor.Systems var air = _atmosphereSystem.GetContainingMixture(uid, true); component.TileGas = air; } + + Alert(uid, component.LastAlarmState); } } } diff --git a/Content.Server/Doors/Systems/FirelockSystem.cs b/Content.Server/Doors/Systems/FirelockSystem.cs index 511577f29f..461007a384 100644 --- a/Content.Server/Doors/Systems/FirelockSystem.cs +++ b/Content.Server/Doors/Systems/FirelockSystem.cs @@ -1,6 +1,7 @@ using Content.Server.Atmos.Monitor.Components; using Content.Server.Atmos.Monitor.Systems; using Content.Server.Doors.Components; +using Content.Server.Power.EntitySystems; using Content.Shared.Atmos.Monitor; using Content.Shared.Doors; using Content.Shared.Doors.Components; @@ -76,6 +77,9 @@ namespace Content.Server.Doors.Systems 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 // remembers was a danger. This is to prevent people from // flooding hallways with endless bad air/fire.