Typecheck all return_air calls (#15363)

This commit is contained in:
Wildkins
2022-12-19 12:19:41 +01:00
committed by GitHub
parent bc3728c4e7
commit bb04ba3f87
53 changed files with 94 additions and 47 deletions
@@ -112,6 +112,8 @@
broadcast_status()
broadcast_status_next_process = FALSE
if(!loc) return FALSE
var/datum/gas_mixture/environment = loc.return_air()
var/power_draw = -1
@@ -279,6 +279,7 @@
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], turn it off first.</span>")
return TRUE
var/datum/gas_mixture/int_air = return_air()
if (!loc) return FALSE
var/datum/gas_mixture/env_air = loc.return_air()
if ((int_air.return_pressure()-env_air.return_pressure()) > PRESSURE_EXERTED)
to_chat(user, "<span class='warning'>You cannot unwrench \the [src], it too exerted due to internal pressure.</span>")
@@ -225,6 +225,7 @@ Thus, the two variables affect pump operation are set in New():
to_chat(user, "<span class='warning'>You cannot unwrench this [src], turn it off first.</span>")
return TRUE
var/datum/gas_mixture/int_air = return_air()
if (!loc) return FALSE
var/datum/gas_mixture/env_air = loc.return_air()
if ((int_air.return_pressure()-env_air.return_pressure()) > PRESSURE_EXERTED && !istype(W, /obj/item/pipewrench))
to_chat(user, "<span class='warning'>You cannot unwrench this [src], it's too exerted due to internal pressure.</span>")