From 33357bdd3e3ef473366b58ca2f32e2333bd114af Mon Sep 17 00:00:00 2001 From: Leshana Date: Wed, 11 Apr 2018 20:58:30 -0400 Subject: [PATCH] Fix allowing frames on walls with machine-under-construction on it already. Add /object/structure/frame to the list of objects that count as wall items. Also convert from strings to actual type paths. ... and fix the paths that haven't existed for four years. Properly speaking it should be a dynamically generated list at some point. --- code/_helpers/unsorted.dm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 41aa04a5c0..fa72634bb8 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -1223,20 +1223,21 @@ proc/is_hot(obj/item/W as obj) /* Checks if that loc and dir has a item on the wall +TODO - Fix this ancient list of wall items. Preferably make it dynamically populated. ~Leshana */ var/list/WALLITEMS = list( - "/obj/machinery/power/apc", "/obj/machinery/alarm", "/obj/item/device/radio/intercom", - "/obj/structure/extinguisher_cabinet", "/obj/structure/reagent_dispensers/peppertank", - "/obj/machinery/status_display", "/obj/machinery/requests_console", "/obj/machinery/light_switch", "/obj/effect/sign", - "/obj/machinery/newscaster", "/obj/machinery/firealarm", "/obj/structure/noticeboard", "/obj/machinery/door_control", - "/obj/machinery/computer/security/telescreen", "/obj/machinery/embedded_controller/radio/simple_vent_controller", - "/obj/item/weapon/storage/secure/safe", "/obj/machinery/door_timer", "/obj/machinery/flasher", "/obj/machinery/keycard_auth", - "/obj/structure/mirror", "/obj/structure/closet/fireaxecabinet", "/obj/machinery/computer/security/telescreen/entertainment" + /obj/machinery/power/apc, /obj/machinery/alarm, /obj/item/device/radio/intercom, /obj/structure/frame, + /obj/structure/extinguisher_cabinet, /obj/structure/reagent_dispensers/peppertank, + /obj/machinery/status_display, /obj/machinery/requests_console, /obj/machinery/light_switch, /obj/structure/sign, + /obj/machinery/newscaster, /obj/machinery/firealarm, /obj/structure/noticeboard, /obj/machinery/button/remote, + /obj/machinery/computer/security/telescreen, /obj/machinery/embedded_controller/radio, + /obj/item/weapon/storage/secure/safe, /obj/machinery/door_timer, /obj/machinery/flasher, /obj/machinery/keycard_auth, + /obj/structure/mirror, /obj/structure/closet/fireaxecabinet, /obj/machinery/computer/security/telescreen/entertainment ) /proc/gotwallitem(loc, dir) for(var/obj/O in loc) for(var/item in WALLITEMS) - if(istype(O, text2path(item))) + if(istype(O, item)) //Direction works sometimes if(O.dir == dir) return 1 @@ -1260,7 +1261,7 @@ var/list/WALLITEMS = list( //Some stuff is placed directly on the wallturf (signs) for(var/obj/O in get_step(loc, dir)) for(var/item in WALLITEMS) - if(istype(O, text2path(item))) + if(istype(O, item)) if(O.pixel_x == 0 && O.pixel_y == 0) return 1 return 0