diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index 63f311d92f3..39f2cc93789 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -66,32 +66,30 @@ qdel(src) return if(istype(W, /obj/item/weapon/storage/fancy/crayons)) - var/list/contents = W.contents - var/crayoncount = 0 - for(var/C in contents) - if(istype(C, /obj/item/toy/crayon)) - crayoncount += 1 - continue - if(crayoncount == 6) - 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() && Adjacent(usr)) - contents = W.contents - crayoncount = 0 - for(var/C in contents) - if(istype(C, /obj/item/toy/crayon)) - crayoncount += 1 - continue - if(crayoncount == 6) - 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) + if(W.contents.len < 6) + to_chat(user, "You must have a full box of crayons to perform this action") + return + 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()) + to_chat(user, "You're in no condition for the fine arts") + return + if(W != user.get_active_hand()) + to_chat(user, "You must be holding the box of crayons to perform this action.") + return + if(! Adjacent(user)) + to_chat(user, "You have moved too far away from the cardboard box.") + return + if(W.contents.len < 6) + to_chat(user, "You must have a full box of crayons to perform this action.") + return + 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)