diff --git a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentPumpSystem.cs b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentPumpSystem.cs index 8951f8a947..2859c7f19d 100644 --- a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentPumpSystem.cs +++ b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasVentPumpSystem.cs @@ -83,13 +83,18 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems var timeDelta = args.dt; var pressureDelta = timeDelta * vent.TargetPressureChange; + var lockout = (environment.Pressure < vent.UnderPressureLockoutThreshold); + if (vent.UnderPressureLockout != lockout) // update visuals only if this changes + { + vent.UnderPressureLockout = lockout; + UpdateState(uid, vent); + } + if (vent.PumpDirection == VentPumpDirection.Releasing && pipe.Air.Pressure > 0) { if (environment.Pressure > vent.MaxPressure) return; - vent.UnderPressureLockout = (environment.Pressure < vent.UnderPressureLockoutThreshold); - if ((vent.PressureChecks & VentPressureBound.ExternalBound) != 0) { // Vents cannot supply high pressures from an almost empty pipe, instead it's proportional to the pipe @@ -267,7 +272,10 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems } else if (vent.PumpDirection == VentPumpDirection.Releasing) { - _appearance.SetData(uid, VentPumpVisuals.State, VentPumpState.Out, appearance); + if (vent.UnderPressureLockout & !vent.PressureLockoutOverride) + _appearance.SetData(uid, VentPumpVisuals.State, VentPumpState.Lockout, appearance); + else + _appearance.SetData(uid, VentPumpVisuals.State, VentPumpState.Out, appearance); } else if (vent.PumpDirection == VentPumpDirection.Siphoning) { @@ -281,7 +289,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems return; if (args.IsInDetailsRange) { - if (pumpComponent.UnderPressureLockout & !pumpComponent.PressureLockoutOverride) + if (pumpComponent.PumpDirection == VentPumpDirection.Releasing & pumpComponent.UnderPressureLockout & !pumpComponent.PressureLockoutOverride) { args.PushMarkup(Loc.GetString("gas-vent-pump-uvlo")); } diff --git a/Content.Shared/Atmos/Piping/Unary/Visuals/VentPumpVisuals.cs b/Content.Shared/Atmos/Piping/Unary/Visuals/VentPumpVisuals.cs index f15ccde5f2..01aeda7b00 100644 --- a/Content.Shared/Atmos/Piping/Unary/Visuals/VentPumpVisuals.cs +++ b/Content.Shared/Atmos/Piping/Unary/Visuals/VentPumpVisuals.cs @@ -15,5 +15,6 @@ namespace Content.Shared.Atmos.Visuals In, Out, Welded, + Lockout, } } diff --git a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/binary.yml b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/binary.yml index 213b0b893d..4961f90be9 100644 --- a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/binary.yml +++ b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/binary.yml @@ -301,6 +301,7 @@ In: { state: vent_in } Out: { state: vent_out } Welded: { state: vent_welded } + Lockout: { state: vent_lockout } - type: PipeColorVisuals - type: GasVentPump inlet: inlet diff --git a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/unary.yml b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/unary.yml index 57d069c72f..63c7665978 100644 --- a/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/unary.yml +++ b/Resources/Prototypes/Entities/Structures/Piping/Atmospherics/unary.yml @@ -55,6 +55,7 @@ In: { state: vent_in } Out: { state: vent_out } Welded: { state: vent_welded } + Lockout: { state: vent_lockout } - type: GasVentPump - type: Construction graph: GasUnary diff --git a/Resources/Textures/Structures/Piping/Atmospherics/vent.rsi/meta.json b/Resources/Textures/Structures/Piping/Atmospherics/vent.rsi/meta.json index 4e1733df55..74e1688748 100644 --- a/Resources/Textures/Structures/Piping/Atmospherics/vent.rsi/meta.json +++ b/Resources/Textures/Structures/Piping/Atmospherics/vent.rsi/meta.json @@ -28,6 +28,10 @@ "name":"vent_in", "directions" : 4, "delays":[ [ 0.08, 0.08, 0.08, 0.08 ], [ 0.08, 0.08, 0.08, 0.08 ], [ 0.08, 0.08, 0.08, 0.08 ], [ 0.08, 0.08, 0.08, 0.08 ] ] + }, + { + "name":"vent_lockout", + "directions" : 4 } ] } diff --git a/Resources/Textures/Structures/Piping/Atmospherics/vent.rsi/vent_lockout.png b/Resources/Textures/Structures/Piping/Atmospherics/vent.rsi/vent_lockout.png new file mode 100644 index 0000000000..bf0b9c928e Binary files /dev/null and b/Resources/Textures/Structures/Piping/Atmospherics/vent.rsi/vent_lockout.png differ