Injectors, vents and scrubbers no longer work when placed on walls (#57971)

fixes gas deletion exploit by stopping injectors, vents and scrubbers from being placed on walls
This commit is contained in:
Ghilker
2021-04-04 11:53:04 -07:00
committed by GitHub
parent 6a12465214
commit ba6d08d5eb
5 changed files with 18 additions and 6 deletions
@@ -51,6 +51,11 @@
/obj/machinery/atmospherics/components/binary/dp_vent_pump/process_atmos()
if(!on)
return
var/turf/location = get_turf(loc)
if(isclosedturf(location))
return
var/datum/gas_mixture/air1 = airs[1]
var/datum/gas_mixture/air2 = airs[2]
@@ -61,6 +61,10 @@
if(!on || !is_operational)
return
var/turf/location = get_turf(loc)
if(isclosedturf(location))
return
var/datum/gas_mixture/air_contents = airs[1]
if(air_contents.temperature > 0)
@@ -68,7 +72,7 @@
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
location.assume_air(removed)
air_update_turf(FALSE, FALSE)
update_parents()
@@ -20,9 +20,11 @@
icon_state = "passive_vent"
/obj/machinery/atmospherics/components/unary/passive_vent/process_atmos()
..()
var/turf/location = get_turf(loc)
if(isclosedturf(location))
return
var/datum/gas_mixture/external = loc.return_air()
var/datum/gas_mixture/external = location.return_air()
var/datum/gas_mixture/internal = airs[1]
if(internal.equalize(external))
@@ -88,7 +88,6 @@
icon_state = "vent_in"
/obj/machinery/atmospherics/components/unary/vent_pump/process_atmos()
..()
if(!is_operational)
return
if(!nodes[1])
@@ -138,13 +138,15 @@
..()
/obj/machinery/atmospherics/components/unary/vent_scrubber/process_atmos()
..()
if(welded || !is_operational)
return FALSE
if(!nodes[1] || !on)
on = FALSE
return FALSE
scrub(loc)
var/turf/open/us = loc
if(!istype(us))
return
scrub(us)
if(widenet)
for(var/turf/tile in adjacent_turfs)
scrub(tile)