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.
This commit is contained in:
Leshana
2018-04-11 20:58:30 -04:00
parent c481f01343
commit a6a396181e

View File

@@ -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