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

@@ -1,21 +1,20 @@
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height, air_group)
if(air_group || (height==0)) return 1
/obj/structure/table/CanPass(atom/movable/mover, turf/target)
if(istype(mover,/obj/item/projectile))
return (check_cover(mover,target))
if (flipped == 1)
if (get_dir(loc, target) == dir)
return !density
else
return 1
return TRUE
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
return TRUE
if(locate(/obj/structure/table/bench) in get_turf(mover))
return 0
return FALSE
var/obj/structure/table/table = locate(/obj/structure/table) in get_turf(mover)
if(table && !table.flipped)
return 1
return 0
return TRUE
return FALSE
//checks if projectile 'P' from turf 'from' can hit whatever is behind the table. Returns 1 if it can, 0 if bullet stops.
/obj/structure/table/proc/check_cover(obj/item/projectile/P, turf/from)