Refactoring underwear to allow custom color preferences.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!Adjacent(user))//no tele-grooming
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
@@ -33,23 +33,36 @@
|
||||
return
|
||||
|
||||
var/choice = input(user, "Underwear, Undershirt, or Socks?", "Changing") as null|anything in list("Underwear","Undershirt","Socks")
|
||||
|
||||
if(!Adjacent(user))
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
switch(choice)
|
||||
if("Underwear")
|
||||
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in GLOB.underwear_list
|
||||
if(new_undies)
|
||||
H.underwear = new_undies
|
||||
|
||||
var/datum/sprite_accessory/underwear/bottom/B = GLOB.underwear_list[new_undies]
|
||||
if(B?.has_color)
|
||||
var/n_undie_color = input(user, "Choose your underwear's color.", "Character Preference", H.undie_color) as color|null
|
||||
if(n_undie_color)
|
||||
H.undie_color = n_undie_color
|
||||
if("Undershirt")
|
||||
var/new_undershirt = input(user, "Select your undershirt", "Changing") as null|anything in GLOB.undershirt_list
|
||||
if(new_undershirt)
|
||||
H.undershirt = new_undershirt
|
||||
var/datum/sprite_accessory/underwear/top/T = GLOB.undershirt_list[new_undershirt]
|
||||
if(T?.has_color)
|
||||
var/n_shirt_color = input(user, "Choose your underwear's color.", "Character Preference", H.shirt_color) as color|null
|
||||
if(n_shirt_color)
|
||||
H.shirt_color = n_shirt_color
|
||||
if("Socks")
|
||||
var/new_socks = input(user, "Select your socks", "Changing") as null|anything in GLOB.socks_list
|
||||
if(new_socks)
|
||||
H.socks= new_socks
|
||||
var/datum/sprite_accessory/underwear/socks/S = GLOB.socks_list[new_socks]
|
||||
if(S?.has_color)
|
||||
var/n_socks_color = input(user, "Choose your underwear's color.", "Character Preference", H.socks_color) as color|null
|
||||
if(n_socks_color)
|
||||
H.socks_color = n_socks_color
|
||||
|
||||
add_fingerprint(H)
|
||||
H.update_body()
|
||||
|
||||
Reference in New Issue
Block a user