From ba97193bef2cf6e9e08aeca779de4dafcd97a690 Mon Sep 17 00:00:00 2001 From: Mike Date: Sat, 19 Apr 2014 17:12:13 -0400 Subject: [PATCH] Fixes #4635 --- code/TriDimension/Turfs.dm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/TriDimension/Turfs.dm b/code/TriDimension/Turfs.dm index 94114c9a9e..ae7bf8202e 100644 --- a/code/TriDimension/Turfs.dm +++ b/code/TriDimension/Turfs.dm @@ -53,6 +53,13 @@ H:updatehealth() return ..() +/turf/proc/hasbelow() + var/turf/controllerlocation = locate(1, 1, z) + for(var/obj/effect/landmark/zcontroller/controller in controllerlocation) + if(controller.down) + return 1 + return 0 + /turf/simulated/floor/open/proc/getbelow() var/turf/controllerlocation = locate(1, 1, z) for(var/obj/effect/landmark/zcontroller/controller in controllerlocation) @@ -73,7 +80,7 @@ //overwrite the attackby of space to transform it to openspace if necessary /turf/space/attackby(obj/item/C as obj, mob/user as mob) - if (istype(C, /obj/item/weapon/cable_coil)) + if (istype(C, /obj/item/weapon/cable_coil) && src.hasbelow()) var/turf/simulated/floor/open/W = src.ChangeTurf(/turf/simulated/floor/open) W.attackby(C, user) return