This commit adds adjacency check, item-still-in-hands check, now properly handles null input, and consumes the crayon box upon completion. Everything compiles, and everything works on local environment.

This commit is contained in:
FlimFlamm
2017-02-06 22:04:33 -04:00
parent 4666222ab5
commit 25f5df4ba3
@@ -66,15 +66,20 @@
qdel(src)
return
if(istype(W, /obj/item/weapon/storage/fancy/crayons)) /////addendum by flimflamm
var/decalselection = input("Please select a decal") in list( "cancel", "atmospherics", "bartender", "barber", "blueshield", "brig_physician", "captain",
var/decalselection = input("Please select a decal") as null|anything in list("atmospherics", "bartender", "barber", "blueshield", "brig_physician", "captain",
"cargo", "chief_engineer", "chaplain", "chef", "chemist", "civilian", "clown", "cmo", "coroner", "detective", "engineering", "genetics", "hop",
"hos", "hydroponics", "internal_affairs_agent", "janitor", "magistrate", "mechanic", "medical", "mime", "mining", "nt_representative", "paramedic", "pod_pilot",
"prisoner", "research_director", "security", "syndicate", "therapist", "virology", "warden", "xenobiology")
if(decalselection == "cancel")
if(!decalselection)
return
if(user.incapacitated())
return
if(W == user.get_active_hand() & src.Adjacent(usr))
icon_opened = ("cardboard_open_"+decalselection)
icon_closed = ("cardboard_"+decalselection)
update_icon() // a proc declared in the closets parent file used to update opened/closed sprites on normal closets
qdel(W)
return
icon_opened = ("cardboard_open_"+decalselection)
icon_closed = ("cardboard_"+decalselection)
update_icon() // a proc declared in the closets parent file used to update opened/closed sprites on normal closets
return
return
return