mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Sock Selection (#1706)
Adds socks to the underwear wardrobe as well as cleans up the wardrobe's code a little.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
#define M_UNDER "Male underwear"
|
||||
#define F_UNDER "Female underwear"
|
||||
#define M_SOCKS "Male socks"
|
||||
#define F_SOCKS "Female socks"
|
||||
#define U_SHIRT "Undershirt"
|
||||
|
||||
/obj/structure/undies_wardrobe
|
||||
name = "underwear wardrobe"
|
||||
desc = "Holds item of clothing you shouldn't be showing off in the hallways."
|
||||
@@ -8,27 +14,52 @@
|
||||
/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)))
|
||||
if(!ishuman(user) || (H.species && !(H.species.appearance_flags & HAS_UNDERWEAR)) && !(H.species.appearance_flags & HAS_SOCKS))
|
||||
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?",,"Male underwear", "Female underwear", "Undershirts")
|
||||
|
||||
var/list/selection_types = list()
|
||||
if (H.species.appearance_flags & HAS_UNDERWEAR)
|
||||
selection_types += list(M_UNDER, F_UNDER, U_SHIRT)
|
||||
if (H.species.appearance_flags & HAS_SOCKS)
|
||||
selection_types += list(M_SOCKS, F_SOCKS)
|
||||
|
||||
var/utype = input("Which section do you want to pick from?") as null|anything in selection_types
|
||||
var/list/selection
|
||||
switch(utype)
|
||||
if("Male underwear")
|
||||
if(M_UNDER)
|
||||
selection = underwear_m
|
||||
if("Female underwear")
|
||||
if(F_UNDER)
|
||||
selection = underwear_f
|
||||
if("Undershirts")
|
||||
if(U_SHIRT)
|
||||
selection = undershirt_t
|
||||
if(M_SOCKS)
|
||||
selection = socks_m
|
||||
if(F_SOCKS)
|
||||
selection = socks_f
|
||||
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 = undershirt_t[pick]
|
||||
else
|
||||
H.underwear = selection[pick]
|
||||
switch (utype)
|
||||
if(U_SHIRT)
|
||||
H.undershirt = undershirt_t[pick]
|
||||
if(F_SOCKS)
|
||||
H.socks = selection[pick]
|
||||
if(M_SOCKS)
|
||||
H.socks = selection[pick]
|
||||
if(M_UNDER)
|
||||
H.underwear = selection[pick]
|
||||
if(F_UNDER)
|
||||
H.underwear = selection[pick]
|
||||
|
||||
H.update_body(1)
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
#undef M_UNDER
|
||||
#undef F_UNDER
|
||||
#undef M_SOCKS
|
||||
#undef F_SOCKS
|
||||
#undef U_SHIRT
|
||||
|
||||
Reference in New Issue
Block a user