From 397c62bf7aaa6e9808a5583bb2d18225ea6c0483 Mon Sep 17 00:00:00 2001 From: Ghommie Date: Wed, 31 Jul 2019 16:19:25 +0200 Subject: [PATCH] undergarment fixes. --- code/game/objects/structures/dresser.dm | 2 +- code/modules/admin/create_mob.dm | 4 +-- code/modules/client/preferences.dm | 12 ++++---- .../mob/dead/new_player/preferences_setup.dm | 6 ++-- .../sprite_accessories/undershirt.dm | 26 ++++++++++++++++- .../sprite_accessories/underwear.dm | 28 +++++++++++++++++++ code/modules/mob/living/carbon/human/human.dm | 1 + 7 files changed, 66 insertions(+), 13 deletions(-) diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index 461e19adf1..8dc560b936 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -79,4 +79,4 @@ var/n_color = input(H, "Choose your [garment_type]'\s color.", "Character Preference", default_color) as color|null if(!n_color || !H.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) return default_color - return n_color + return sanitize_hexcolor(n_color, include_crunch= TRUE) diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm index fad7410a6a..f66cda42dc 100644 --- a/code/modules/admin/create_mob.dm +++ b/code/modules/admin/create_mob.dm @@ -15,9 +15,9 @@ H.real_name = random_unique_name(H.gender) H.name = H.real_name H.underwear = random_underwear(H.gender) - H.undie_color = random_color() + H.undie_color = random_short_color() H.undershirt = random_undershirt(H.gender) - H.shirt_color = random_color() + H.shirt_color = random_short_color() H.skin_tone = random_skin_tone() H.hair_style = random_hair_style(H.gender) H.facial_hair_style = random_facial_hair_style(H.gender) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 7c508f94be..cd22685952 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1412,13 +1412,13 @@ GLOBAL_LIST_EMPTY(preferences_datums) facial_hair_style = random_facial_hair_style(gender) if("underwear") underwear = random_underwear(gender) - undie_color = random_color() + undie_color = random_short_color() if("undershirt") undershirt = random_undershirt(gender) - shirt_color = random_color() + shirt_color = random_short_color() if("socks") socks = random_socks() - socks_color = random_color() + socks_color = random_short_color() if(BODY_ZONE_PRECISE_EYES) eye_color = random_eye_color() if("s_tone") @@ -1533,7 +1533,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("undie_color") var/n_undie_color = input(user, "Choose your underwear's color.", "Character Preference", undie_color) as color|null if(n_undie_color) - undie_color = n_undie_color + undie_color = sanitize_hexcolor(n_undie_color, include_crunch= TRUE) if("undershirt") var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_list @@ -1543,7 +1543,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("shirt_color") var/n_shirt_color = input(user, "Choose your undershirt's color.", "Character Preference", shirt_color) as color|null if(n_shirt_color) - shirt_color = n_shirt_color + shirt_color = sanitize_hexcolor(n_shirt_color, include_crunch= TRUE) if("socks") var/new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in GLOB.socks_list @@ -1553,7 +1553,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("socks_color") var/n_socks_color = input(user, "Choose your socks' color.", "Character Preference", socks_color) as color|null if(n_socks_color) - socks_color = n_socks_color + socks_color = sanitize_hexcolor(n_socks_color, include_crunch= TRUE) if("eyes") var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference","#"+eye_color) as color|null diff --git a/code/modules/mob/dead/new_player/preferences_setup.dm b/code/modules/mob/dead/new_player/preferences_setup.dm index ffe9a800a1..6e91b58506 100644 --- a/code/modules/mob/dead/new_player/preferences_setup.dm +++ b/code/modules/mob/dead/new_player/preferences_setup.dm @@ -6,11 +6,11 @@ else gender = pick(MALE,FEMALE) underwear = random_underwear(gender) - undie_color = random_color() + undie_color = random_short_color() undershirt = random_undershirt(gender) - shirt_color = random_color() + shirt_color = random_short_color() socks = random_socks() - socks_color = random_color() + socks_color = random_short_color() skin_tone = random_skin_tone() hair_style = random_hair_style(gender) facial_hair_style = random_facial_hair_style(gender) diff --git a/code/modules/mob/dead/new_player/sprite_accessories/undershirt.dm b/code/modules/mob/dead/new_player/sprite_accessories/undershirt.dm index bf63ea09d7..fb40563ccf 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/undershirt.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/undershirt.dm @@ -172,11 +172,13 @@ name = "Tank Top - Midriff" icon_state = "tank_midriff" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/tanktop_midriff_alt name = "Tank Top - Midriff Halterneck" icon_state = "tank_midriff_alt" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/tankstripe name = "Tank Top - Striped" @@ -190,100 +192,122 @@ name = "Baby-Doll" icon_state = "babydoll" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/bra name = "Bra" icon_state = "bra" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/bra_alt name = "Bra - Alt" icon_state = "bra_alt" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/bra_thin name = "Bra - Thin" icon_state = "bra_thin" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/bra_kinky name = "Bra - Kinky Black" icon_state = "bra_kinky" + gender = FEMALE /datum/sprite_accessory/underwear/top/bra_freedom name = "Bra - Freedom" icon_state = "bra_assblastusa" + gender = FEMALE /datum/sprite_accessory/underwear/top/bra_commie name = "Bra - Commie" icon_state = "bra_commie" + gender = FEMALE /datum/sprite_accessory/underwear/top/bra_beekini name = "Bra - Bee-kini" icon_state = "bra_bee-kini" + gender = FEMALE /datum/sprite_accessory/underwear/top/bra_uk name = "Bra - UK" icon_state = "bra_uk" + gender = FEMALE /datum/sprite_accessory/underwear/top/bra_neko name = "Bra - Neko" icon_state = "bra_neko" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/halterneck_bra name = "Bra - Halterneck" icon_state = "halterneck_bra" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/sports_bra name = "Bra, Sports" icon_state = "sports_bra" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/sports_bra_alt name = "Bra, Sports - Alt" icon_state = "sports_bra_alt" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/bra_strapless name = "Bra, Strapless" icon_state = "bra_strapless" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/bra_strapless_alt name = "Bra, Strapless - Alt" icon_state = "bra_blue" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/striped_bra name = "Bra - Striped" icon_state = "striped_bra" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/fishnet_sleeves name = "Fishnet - sleeves" icon_state = "fishnet_sleeves" + gender = FEMALE /datum/sprite_accessory/underwear/top/fishnet_gloves name = "Fishnet - gloves" icon_state = "fishnet_gloves" + gender = FEMALE /datum/sprite_accessory/underwear/top/fishnet_base name = "Fishnet - top" icon_state = "fishnet_body" + gender = FEMALE /datum/sprite_accessory/underwear/top/swimsuit name = "Swimsuit Top" icon_state = "bra_swimming" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/swimsuit_alt name = "Swimsuit Top - Strapless" icon_state = "bra_swimming_alt" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/top/tubetop name = "Tube Top" icon_state = "tubetop" - has_color = TRUE \ No newline at end of file + has_color = TRUE + gender = FEMALE \ No newline at end of file diff --git a/code/modules/mob/dead/new_player/sprite_accessories/underwear.dm b/code/modules/mob/dead/new_player/sprite_accessories/underwear.dm index 611547ad4e..3356804cb3 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/underwear.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/underwear.dm @@ -10,45 +10,55 @@ name = "Mankini" icon_state = "mankini" has_color = TRUE + gender = MALE /datum/sprite_accessory/underwear/bottom/male_kinky name = "Jockstrap" icon_state = "jockstrap" has_color = TRUE + gender = MALE /datum/sprite_accessory/underwear/bottom/briefs name = "Briefs" icon_state = "briefs" has_color = TRUE + gender = MALE /datum/sprite_accessory/underwear/bottom/boxers name = "Boxers" icon_state = "boxers" has_color = TRUE + gender = MALE /datum/sprite_accessory/underwear/bottom/male_bee name = "Boxers - Bee" icon_state = "bee_shorts" + gender = MALE /datum/sprite_accessory/underwear/bottom/male_hearts name = "Boxers - Heart" icon_state = "boxers_heart" + gender = MALE /datum/sprite_accessory/underwear/bottom/male_stripe name = "Boxers - Striped" icon_state = "boxers_striped" + gender = MALE /datum/sprite_accessory/underwear/bottom/male_commie name = "Boxers - Striped Communist" icon_state = "boxers_commie" + gender = MALE /datum/sprite_accessory/underwear/bottom/male_usastripe name = "Boxers - Striped Freedom" icon_state = "boxers_assblastusa" + gender = MALE /datum/sprite_accessory/underwear/bottom/male_uk name = "Boxers - Striped UK" icon_state = "boxers_uk" + gender = MALE /datum/sprite_accessory/underwear/bottom/boxer_briefs name = "Boxer Briefs" @@ -59,60 +69,73 @@ name = "Panties" icon_state = "panties" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/bottom/panties_alt name = "Panties - Alt" icon_state = "panties_alt" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/bottom/fishnet_lower name = "Panties - Fishnet" icon_state = "fishnet_lower" + gender = FEMALE /datum/sprite_accessory/underwear/bottom/female_beekini name = "Panties - Bee-kini" icon_state = "panties_bee-kini" + gender = FEMALE /datum/sprite_accessory/underwear/bottom/female_commie name = "Panties - Commie" icon_state = "panties_commie" + gender = FEMALE /datum/sprite_accessory/underwear/bottom/female_usastripe name = "Panties - Freedom" icon_state = "panties_assblastusa" + gender = FEMALE /datum/sprite_accessory/underwear/bottom/female_kinky name = "Panties - Kinky Black" icon_state = "panties_kinky" + gender = FEMALE /datum/sprite_accessory/underwear/bottom/panties_uk name = "Panties - UK" icon_state = "panties_uk" + gender = FEMALE /datum/sprite_accessory/underwear/bottom/panties_neko name = "Panties - Neko" icon_state = "panties_neko" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/bottom/panties_slim name = "Panties - Slim" icon_state = "panties_slim" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/bottom/striped_panties name = "Panties - Striped" icon_state = "striped_panties" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/bottom/panties_swimsuit name = "Panties - Swimsuit" icon_state = "panties_swimming" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/bottom/panties_thin name = "Panties - Thin" icon_state = "panties_thin" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/bottom/longjon name = "Long John Bottoms" @@ -122,23 +145,28 @@ /datum/sprite_accessory/underwear/bottom/swimsuit_red name = "Swimsuit, One Piece - Red" icon_state = "swimming_red" + gender = FEMALE /datum/sprite_accessory/underwear/bottom/swimsuit name = "Swimsuit, One Piece - Black" icon_state = "swimming_black" + gender = FEMALE /datum/sprite_accessory/underwear/bottom/swimsuit_blue name = "Swimsuit, One Piece - Striped Blue" icon_state = "swimming_blue" + gender = FEMALE /datum/sprite_accessory/underwear/bottom/thong name = "Thong" icon_state = "thong" has_color = TRUE + gender = FEMALE /datum/sprite_accessory/underwear/bottom/thong_babydoll name = "Thong - Alt" icon_state = "thong_babydoll" has_color = TRUE + gender = FEMALE diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 67596a828a..69926f46f9 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -623,6 +623,7 @@ facial_hair_style = "Shaved" hair_style = pick("Bedhead", "Bedhead 2", "Bedhead 3") underwear = "Nude" + undershirt = "Nude" update_body() update_hair() update_genitals()