From b8e84c73bf803b5cac232d0a81b7efe03555584e Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Tue, 27 Jul 2021 19:26:11 -0400 Subject: [PATCH] Prevents vents / scrubbers from making air from walls (#16236) * Prevents getting free air from walls * Almost forgot --- .../machinery/components/unary_devices/passive_vent.dm | 4 ++++ .../machinery/components/unary_devices/vent_pump.dm | 3 +++ .../machinery/components/unary_devices/vent_scrubber.dm | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm b/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm index 70ae5280a55..9859058d731 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm @@ -23,6 +23,10 @@ if(!node) return 0 + var/turf/T = loc + if(T.density) //No, you should not be able to get free air from walls + return + var/datum/gas_mixture/environment = loc.return_air() var/pressure_delta = air_contents.return_pressure() - environment.return_pressure() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm index 35e9a84e932..ce89e03b48a 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm @@ -130,6 +130,9 @@ ..() if(stat & (NOPOWER|BROKEN)) return FALSE + var/turf/T = loc + if(T.density) //No, you should not be able to get free air from walls + return if(!node) on = FALSE //broadcast_status() // from now air alarm/control computer should request update purposely --rastaf0 diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm index d006ae874f3..577bdbdb625 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm @@ -196,6 +196,10 @@ if(stat & (NOPOWER|BROKEN)) return + var/turf/T = loc + if(T.density) //No, you should not be able to get free air from walls + return + if(!node) on = 0