diff --git a/Content.Server/Atmos/Piping/Unary/Components/GasVentPumpComponent.cs b/Content.Server/Atmos/Piping/Unary/Components/GasVentPumpComponent.cs
index 25b15f0ed5..a9aa40611d 100644
--- a/Content.Server/Atmos/Piping/Unary/Components/GasVentPumpComponent.cs
+++ b/Content.Server/Atmos/Piping/Unary/Components/GasVentPumpComponent.cs
@@ -11,8 +11,12 @@ namespace Content.Server.Atmos.Piping.Unary.Components
[RegisterComponent]
public sealed partial class GasVentPumpComponent : Component
{
+ ///
+ /// Identifies if the device is enabled by an air alarm. Does not indicate if the device is powered.
+ /// By default, all air vents start enabled, whether linked to an alarm or not.
+ ///
[ViewVariables(VVAccess.ReadWrite)]
- public bool Enabled { get; set; } = false;
+ public bool Enabled { get; set; } = true;
[ViewVariables]
public bool IsDirty { get; set; } = false;
diff --git a/Content.Server/Atmos/Piping/Unary/Components/GasVentScrubberComponent.cs b/Content.Server/Atmos/Piping/Unary/Components/GasVentScrubberComponent.cs
index b2143283f7..4a9437bc1f 100644
--- a/Content.Server/Atmos/Piping/Unary/Components/GasVentScrubberComponent.cs
+++ b/Content.Server/Atmos/Piping/Unary/Components/GasVentScrubberComponent.cs
@@ -9,8 +9,12 @@ namespace Content.Server.Atmos.Piping.Unary.Components
[Access(typeof(GasVentScrubberSystem))]
public sealed partial class GasVentScrubberComponent : Component
{
+ ///
+ /// Identifies if the device is enabled by an air alarm. Does not indicate if the device is powered.
+ /// By default, all air scrubbers start enabled, whether linked to an alarm or not.
+ ///
[DataField]
- public bool Enabled { get; set; } = false;
+ public bool Enabled { get; set; } = true;
[DataField]
public bool IsDirty { get; set; } = false;
diff --git a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentPumpSystem.cs b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentPumpSystem.cs
index c58d6eb14b..93f7dcf111 100644
--- a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentPumpSystem.cs
+++ b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentPumpSystem.cs
@@ -9,6 +9,8 @@ using Content.Server.DeviceNetwork.Components;
using Content.Server.DeviceNetwork.Systems;
using Content.Server.NodeContainer.EntitySystems;
using Content.Server.NodeContainer.Nodes;
+using Content.Server.Power.Components;
+using Content.Server.Power.EntitySystems;
using Content.Shared.Administration.Logs;
using Content.Shared.Atmos;
using Content.Shared.Atmos.Monitor;
@@ -43,6 +45,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
[Dependency] private readonly SharedToolSystem _toolSystem = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
[Dependency] private readonly IGameTiming _timing = default!;
+ [Dependency] private readonly PowerReceiverSystem _powerReceiverSystem = default!;
public override void Initialize()
{
base.Initialize();
@@ -66,9 +69,10 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
{
//Bingo waz here
if (_weldable.IsWelded(uid))
- {
return;
- }
+
+ if (!_powerReceiverSystem.IsPowered(uid))
+ return;
var nodeName = vent.PumpDirection switch
{
@@ -210,7 +214,6 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
private void OnPowerChanged(EntityUid uid, GasVentPumpComponent component, ref PowerChangedEvent args)
{
- component.Enabled = args.Powered;
UpdateState(uid, component);
}
@@ -318,7 +321,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
_ambientSoundSystem.SetAmbience(uid, false);
_appearance.SetData(uid, VentPumpVisuals.State, VentPumpState.Welded, appearance);
}
- else if (!vent.Enabled)
+ else if (!_powerReceiverSystem.IsPowered(uid) || !vent.Enabled)
{
_ambientSoundSystem.SetAmbience(uid, false);
_appearance.SetData(uid, VentPumpVisuals.State, VentPumpState.Off, appearance);
diff --git a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentScrubberSystem.cs b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentScrubberSystem.cs
index 0207535398..38d75701d7 100644
--- a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentScrubberSystem.cs
+++ b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentScrubberSystem.cs
@@ -10,6 +10,7 @@ using Content.Server.NodeContainer;
using Content.Server.NodeContainer.EntitySystems;
using Content.Server.NodeContainer.Nodes;
using Content.Server.Power.Components;
+using Content.Server.Power.EntitySystems;
using Content.Shared.Administration.Logs;
using Content.Shared.Atmos;
using Content.Shared.Atmos.Piping.Unary.Visuals;
@@ -37,6 +38,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
[Dependency] private readonly TransformSystem _transformSystem = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly WeldableSystem _weldable = default!;
+ [Dependency] private readonly PowerReceiverSystem _powerReceiverSystem = default!;
public override void Initialize()
{
@@ -58,6 +60,9 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
var timeDelta = args.dt;
+ if (!_powerReceiverSystem.IsPowered(uid))
+ return;
+
if (!scrubber.Enabled || !_nodeContainer.TryGetNode(uid, scrubber.OutletName, out PipeNode? outlet))
return;
@@ -141,7 +146,6 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
private void OnPowerChanged(EntityUid uid, GasVentScrubberComponent component, ref PowerChangedEvent args)
{
- component.Enabled = args.Powered;
UpdateState(uid, component);
}
@@ -225,7 +229,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
_ambientSoundSystem.SetAmbience(uid, false);
_appearance.SetData(uid, ScrubberVisuals.State, ScrubberState.Welded, appearance);
}
- else if (!scrubber.Enabled)
+ else if (!_powerReceiverSystem.IsPowered(uid) || !scrubber.Enabled)
{
_ambientSoundSystem.SetAmbience(uid, false);
_appearance.SetData(uid, ScrubberVisuals.State, ScrubberState.Off, appearance);