table climbing fix (#16203)

* table climbing fix

* TRUE/FALSE
This commit is contained in:
hal9000PR
2021-06-18 21:00:27 +01:00
committed by GitHub
parent acfcce6728
commit 45449da433
+9 -7
View File
@@ -108,25 +108,27 @@
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0)
if(height == 0)
return 1
return TRUE
if(istype(mover,/obj/item/projectile))
return (check_cover(mover,target))
if(ismob(mover))
var/mob/M = mover
if(M.flying)
return 1
return TRUE
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
return TRUE
if(mover.throwing)
return 1
return TRUE
if(length(get_atoms_of_type(get_turf(mover), /obj/structure/table) - mover))
return 1
var/obj/structure/table/T = locate(/obj/structure/table) in get_turf(mover)
if(!T.flipped)
return TRUE
if(flipped)
if(get_dir(loc, target) == dir)
return !density
else
return 1
return 0
return TRUE
return FALSE
/obj/structure/table/CanAStarPass(ID, dir, caller)
. = !density