From 79ae8d882935db1c780da2112ef50cb67ff973f3 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Fri, 15 Sep 2017 03:24:57 -0500 Subject: [PATCH] [MIRROR] Ports chasm exceptions to typecaches (#2777) * Ports chasm exceptions to typecaches (#30717) * Ports chasm exceptions to typecaches * Ports chasm exceptions to typecaches --- code/game/turfs/simulated/chasm.dm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/code/game/turfs/simulated/chasm.dm b/code/game/turfs/simulated/chasm.dm index a7acd8d6fa..da92d6b9dd 100644 --- a/code/game/turfs/simulated/chasm.dm +++ b/code/game/turfs/simulated/chasm.dm @@ -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))