Fix return values of CanZASPass

- CanZASPass is supposed to return boolean.  Nobody noticed this bug because ATMOS_PASS_YES and ATMOS_PASS_NO happen to be defined as 1 and 0.  But thats not a good assumption to make, so lets fix it!
This commit is contained in:
Leshana
2020-04-30 14:50:57 -04:00
parent 2bf97ba35f
commit 4a2e8bb0c4
7 changed files with 12 additions and 11 deletions
+3 -2
View File
@@ -8,8 +8,9 @@
return !P.can_hit_target(src, P.permutated, src == P.original, TRUE)
return (!mover.density || !density || lying)
/mob/CanZASPass(turf/T, is_zone)
return ATMOS_PASS_YES
// There is no need to override this if you're just going to unconditionally return TRUE. Set can_atmos_pass instead.
///mob/CanZASPass(turf/T, is_zone)
// return TRUE
/mob/living/SelfMove(turf/n, direct)
// If on walk intent, don't willingly step into hazardous tiles.
+1 -1
View File
@@ -96,7 +96,7 @@
// When anchored, don't let air past us.
/obj/machinery/compressor/CanZASPass(turf/T, is_zone)
return anchored ? ATMOS_PASS_NO : ATMOS_PASS_YES
return !anchored
/obj/machinery/compressor/proc/locate_machinery()
if(turbine)