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
+1 -2
View File
@@ -580,8 +580,7 @@
/obj/structure/closet/airbubble/proc/get_turf_air()
var/turf/T = get_turf(src)
if(T)
. = T.return_air()
return
return T.return_air()
/obj/structure/closet/airbubble/proc/return_pressure()
. = 0
+2 -2
View File
@@ -377,9 +377,9 @@ BREATH ANALYZER
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
/obj/item/device/analyzer/atmosanalyze(var/mob/user)
if(!user) return
var/air = user.return_air()
if (!air)
return
if (!air) return
return atmosanalyzer_scan(src, air, user)
@@ -84,7 +84,7 @@
return C.air_contents.temperature
var/turf/T = get_turf(src)
if(istype(T, /turf/space))
if(istype(T, /turf/space) || !isturf(T))
return FALSE //space has no temperature, this just makes sure the cooling unit works in space
var/datum/gas_mixture/environment = T.return_air()
-2
View File
@@ -101,8 +101,6 @@
/obj/return_air()
if(loc)
return loc.return_air()
else
return null
/obj/proc/updateUsrDialog()
if(in_use)
-2
View File
@@ -62,8 +62,6 @@
/obj/structure/pit/return_air()
if(open && loc)
return loc.return_air()
else
return null
/obj/structure/pit/proc/digout(mob/escapee)
var/breakout_time = 1 //2 minutes by default
@@ -366,6 +366,7 @@ obj/structure/ex_act(severity)
// giving it a chance to mix its internal air supply with the turf it is
// currently on.
/obj/structure/transit_tube_pod/proc/mix_air()
if(!loc) return
var/datum/gas_mixture/environment = loc.return_air()
//note that share_ratio assumes both gas mixes have the same volume,