mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-15 04:32:14 +00:00
Finishes seperating ZAS logic from CanPass().
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user