[MIRROR] Ports chasm exceptions to typecaches (#2777)

* Ports chasm exceptions to typecaches (#30717)

* Ports chasm exceptions to typecaches

* Ports chasm exceptions to typecaches
This commit is contained in:
CitadelStationBot
2017-09-15 03:24:57 -05:00
committed by Poojawa
parent 574c967f87
commit 79ae8d8829
+3 -6
View File
@@ -11,6 +11,7 @@
canSmoothWith = list(/turf/open/floor/fakepit, /turf/open/chasm)
density = TRUE //This will prevent hostile mobs from pathing into chasms, while the canpass override will still let it function like an open turf
var/static/list/falling_atoms = list() //Atoms currently falling into the chasm
var/static/list/forbidden_types = typecacheof(list(/obj/effect/portal, /obj/singularity, /obj/structure/stone_tile, /obj/item/projectile, /obj/effect/abstract, /obj/effect/temp_visual))
var/drop_x = 1
var/drop_y = 1
var/drop_z = 1
@@ -88,12 +89,7 @@
return FALSE
if(!isliving(AM) && !isobj(AM))
return FALSE
if(istype(AM, /obj/singularity) || istype(AM, /obj/item/projectile) || AM.throwing)
return FALSE
if(istype(AM, /obj/effect/portal))
//Portals aren't affected by gravity. Probably.
return FALSE
if(istype(AM, /obj/structure/stone_tile))
if(is_type_in_typecache(AM, forbidden_types) || AM.throwing)
return FALSE
//Flies right over the chasm
if(isliving(AM))
@@ -110,6 +106,7 @@
return FALSE
return TRUE
/turf/open/chasm/proc/drop(atom/movable/AM)
//Make sure the item is still there after our sleep
if(!AM || QDELETED(AM))