From 6ede4c9ef8a4f789f00f411525dc94229a337c84 Mon Sep 17 00:00:00 2001 From: FlimFlamm Date: Tue, 7 Feb 2017 03:22:13 -0400 Subject: [PATCH] This commit improves again the legibility of the list of decal options presented to the user, fixes a minor syntactical error involving ampersands, and deletes superfluous returns at the end of attackby proc. --- .../crates_lockers/closets/cardboardbox.dm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index f5e0bd02819..f6dd2b97b1a 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -65,21 +65,20 @@ M.show_message("\The [src] has been cut apart by [user] with \the [WC].", 3, "You hear cutting.", 2) qdel(src) return - if(istype(W, /obj/item/weapon/storage/fancy/crayons)) /////addendum by flimflamm - 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(istype(W, /obj/item/weapon/storage/fancy/crayons)) + 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) return if(user.incapacitated()) return - if(W == user.get_active_hand() & src.Adjacent(usr)) + if(W == user.get_active_hand() && Adjacent(usr)) + decalselection = replacetext(decalselection, " ", "_") + decalselection = lowertext(decalselection) 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 - return - return