Files
Polaris/code/game/objects/structures/under_wardrobe.dm
Datraen d0bd6b8857 [BUG FIX] Wardrobe
Socks are now able to be changed from the wardrobe
2015-10-11 00:40:54 -04:00

41 lines
1.2 KiB
Plaintext

/obj/structure/undies_wardrobe
name = "underwear wardrobe"
desc = "Holds item of clothing you shouldn't be showing off in the hallways."
icon = 'icons/obj/closet.dmi'
icon_state = "cabinet_closed"
density = 1
/obj/structure/undies_wardrobe/attack_hand(mob/user as mob)
src.add_fingerprint(user)
var/mob/living/carbon/human/H = user
if(!ishuman(user) || (H.species && !(H.species.appearance_flags & HAS_UNDERWEAR)))
user << "<span class='warning'>Sadly there's nothing in here for you to wear.</span>"
return 0
var/utype = alert("Which section do you want to pick from?",,"Underwear", "Undershirts", "Socks",)
var/list/selection
switch(utype)
if("Underwear")
var/utype2 = alert("Which section do you want to pick from?",,"Male", "Female")
switch(utype2)
if("Male")
selection = underwear_m
if("Female")
selection = underwear_f
if("Undershirts")
selection = undershirt_t
if("Socks")
selection = socks_t
var/pick = input("Select the style") as null|anything in selection
if(pick)
if(get_dist(src,user) > 1)
return
if(utype == "Undershirts")
H.undershirt = selection[pick]
else if(utype == "Socks")
H.socks = selection[pick]
else
H.underwear = selection[pick]
H.update_body(1)
return 1