diff --git a/Content.Server/Atmos/Piping/Trinary/EntitySystems/PressureControlledValveSystem.cs b/Content.Server/Atmos/Piping/Trinary/EntitySystems/PressureControlledValveSystem.cs index ff0f6d07846..e5164170f40 100644 --- a/Content.Server/Atmos/Piping/Trinary/EntitySystems/PressureControlledValveSystem.cs +++ b/Content.Server/Atmos/Piping/Trinary/EntitySystems/PressureControlledValveSystem.cs @@ -38,23 +38,22 @@ private void OnUpdate(EntityUid uid, PressureControlledValveComponent comp, ref } // If the pressure in either inlet or outlet exceeds the side pressure, act as an open pipe. - if (controlNode.Air.Pressure > inletNode.Air.Pressure - || controlNode.Air.Pressure > outletNode.Air.Pressure) + if (controlNode.Air.Pressure < inletNode.Air.Pressure + || controlNode.Air.Pressure < outletNode.Air.Pressure) { - inletNode.RemoveAlwaysReachable(outletNode); - outletNode.RemoveAlwaysReachable(inletNode); - comp.Enabled = false; + inletNode.AddAlwaysReachable(outletNode); + outletNode.AddAlwaysReachable(inletNode); + comp.Enabled = true; UpdateAppearance(uid, comp); - _ambientSoundSystem.SetAmbience(uid, false); + _ambientSoundSystem.SetAmbience(uid, true); return; } - inletNode.AddAlwaysReachable(outletNode); - outletNode.AddAlwaysReachable(inletNode); - - comp.Enabled = true; + inletNode.RemoveAlwaysReachable(outletNode); + outletNode.RemoveAlwaysReachable(inletNode); + comp.Enabled = false; UpdateAppearance(uid, comp); - _ambientSoundSystem.SetAmbience(uid, true); + _ambientSoundSystem.SetAmbience(uid, false); } private void OnFilterLeaveAtmosphere(EntityUid uid, PressureControlledValveComponent comp, ref AtmosDeviceDisabledEvent args)