Finishes seperating ZAS logic from CanPass().

This commit is contained in:
Neerti
2019-02-10 01:46:38 -05:00
parent d880379bbf
commit 76b077af4a
47 changed files with 153 additions and 260 deletions

View File

@@ -3,6 +3,7 @@
desc = "A window."
icon = 'icons/obj/structures.dmi'
density = 1
can_atmos_pass = ATMOS_PASS_DENSITY
w_class = ITEMSIZE_NORMAL
layer = WINDOW_LAYER
@@ -129,7 +130,7 @@
/obj/structure/window/blob_act()
take_damage(50)
/obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
/obj/structure/window/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && mover.checkpass(PASSGLASS))
return TRUE
if(is_fulltile())
@@ -139,6 +140,11 @@
else
return TRUE
/obj/structure/window/CanZASPass(turf/T, is_zone)
if(is_fulltile() || get_dir(T, loc) == turn(dir, 180)) // Make sure we're handling the border correctly.
return anchored ? ATMOS_PASS_NO : ATMOS_PASS_YES // If it's anchored, it'll block air.
return ATMOS_PASS_YES // Don't stop airflow from the other sides.
/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf)
if(istype(O) && O.checkpass(PASSGLASS))
return 1