diff --git a/code/game/objects/structures/under_wardrobe.dm b/code/game/objects/structures/under_wardrobe.dm index edc3962cdf6..639887a6030 100644 --- a/code/game/objects/structures/under_wardrobe.dm +++ b/code/game/objects/structures/under_wardrobe.dm @@ -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 << "Sadly there's nothing in here for you to wear." 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 \ No newline at end of file + return 1 + +#undef M_UNDER +#undef F_UNDER +#undef M_SOCKS +#undef F_SOCKS +#undef U_SHIRT diff --git a/html/changelogs/lohikar-sockdrobe.yml b/html/changelogs/lohikar-sockdrobe.yml new file mode 100644 index 00000000000..944aa4ba811 --- /dev/null +++ b/html/changelogs/lohikar-sockdrobe.yml @@ -0,0 +1,4 @@ +author: Lohikar +delete-after: True +changes: + - rscadd: "You can now change your socks at the underwear wardrobe."