From 30b650bf76813f56895e1b8fcff31c382e2ed5df Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 2 May 2021 00:55:58 +0200 Subject: [PATCH] [MIRROR] Remove gender-specific preferences (#5375) * Remove gender-specific preferences (#58785) Makes hair (which already was, I think?), underwear, facial hair, and undershirts all available to all genders. Random character generation is not changed. Eventually, I want to remake random characters to look more believable, but that is out of scope. Gender-specific preferences are an outdated trope that make the code harder to work with. This change is also important as a total makeover of the preferences menu and the preference internals are going underway. It is significantly easier to work with when a preference can simply be a list of things you can choose, rather than having to depend on another preference to decide what they can show. While I could make this change at that time, it is also important that the new preferences menu keep parity, and avoid bikeshed on a trifling detail. * Remove gender-specific preferences * AAA Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Gandalf --- code/modules/client/preferences.dm | 60 +++---------------- code/modules/client/preferences_savefile.dm | 20 ++----- .../modules/client/preferences.dm | 60 +++---------------- .../modules/client/preferences_savefile.dm | 20 ++----- 4 files changed, 24 insertions(+), 136 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 47ba0a2eaf1..f65fb208e57 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1310,31 +1310,15 @@ GLOBAL_LIST_EMPTY(preferences_datums) hair_color = sanitize_hexcolor(new_hair) if("hairstyle") - var/new_hairstyle - if(gender == MALE) - new_hairstyle = input(user, "Choose your character's hairstyle:", "Character Preference") as null|anything in GLOB.hairstyles_male_list - else if(gender == FEMALE) - new_hairstyle = input(user, "Choose your character's hairstyle:", "Character Preference") as null|anything in GLOB.hairstyles_female_list - else - new_hairstyle = input(user, "Choose your character's hairstyle:", "Character Preference") as null|anything in GLOB.hairstyles_list + var/new_hairstyle = input(user, "Choose your character's hairstyle:", "Character Preference") as null|anything in GLOB.hairstyles_list if(new_hairstyle) hairstyle = new_hairstyle if("next_hairstyle") - if (gender == MALE) - hairstyle = next_list_item(hairstyle, GLOB.hairstyles_male_list) - else if(gender == FEMALE) - hairstyle = next_list_item(hairstyle, GLOB.hairstyles_female_list) - else - hairstyle = next_list_item(hairstyle, GLOB.hairstyles_list) + hairstyle = next_list_item(hairstyle, GLOB.hairstyles_list) if("previous_hairstyle") - if (gender == MALE) - hairstyle = previous_list_item(hairstyle, GLOB.hairstyles_male_list) - else if(gender == FEMALE) - hairstyle = previous_list_item(hairstyle, GLOB.hairstyles_female_list) - else - hairstyle = previous_list_item(hairstyle, GLOB.hairstyles_list) + hairstyle = previous_list_item(hairstyle, GLOB.hairstyles_list) if("facial") var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference","#"+facial_hair_color) as color|null @@ -1342,40 +1326,18 @@ GLOBAL_LIST_EMPTY(preferences_datums) facial_hair_color = sanitize_hexcolor(new_facial) if("facial_hairstyle") - var/new_facial_hairstyle - if(gender == MALE) - new_facial_hairstyle = input(user, "Choose your character's facial-hairstyle:", "Character Preference") as null|anything in GLOB.facial_hairstyles_male_list - else if(gender == FEMALE) - new_facial_hairstyle = input(user, "Choose your character's facial-hairstyle:", "Character Preference") as null|anything in GLOB.facial_hairstyles_female_list - else - new_facial_hairstyle = input(user, "Choose your character's facial-hairstyle:", "Character Preference") as null|anything in GLOB.facial_hairstyles_list + var/new_facial_hairstyle = input(user, "Choose your character's facial-hairstyle:", "Character Preference") as null|anything in GLOB.facial_hairstyles_list if(new_facial_hairstyle) facial_hairstyle = new_facial_hairstyle if("next_facehairstyle") - if (gender == MALE) - facial_hairstyle = next_list_item(facial_hairstyle, GLOB.facial_hairstyles_male_list) - else if(gender == FEMALE) - facial_hairstyle = next_list_item(facial_hairstyle, GLOB.facial_hairstyles_female_list) - else - facial_hairstyle = next_list_item(facial_hairstyle, GLOB.facial_hairstyles_list) + facial_hairstyle = next_list_item(facial_hairstyle, GLOB.facial_hairstyles_list) if("previous_facehairstyle") - if (gender == MALE) - facial_hairstyle = previous_list_item(facial_hairstyle, GLOB.facial_hairstyles_male_list) - else if (gender == FEMALE) - facial_hairstyle = previous_list_item(facial_hairstyle, GLOB.facial_hairstyles_female_list) - else - facial_hairstyle = previous_list_item(facial_hairstyle, GLOB.facial_hairstyles_list) + facial_hairstyle = previous_list_item(facial_hairstyle, GLOB.facial_hairstyles_list) if("underwear") - var/new_underwear - if(gender == MALE) - new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_m - else if(gender == FEMALE) - new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_f - else - new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_list + var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_list if(new_underwear) underwear = new_underwear @@ -1385,13 +1347,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) underwear_color = sanitize_hexcolor(new_underwear_color) if("undershirt") - var/new_undershirt - if(gender == MALE) - new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_m - else if(gender == FEMALE) - new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_f - else - new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_list + var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_list if(new_undershirt) undershirt = new_undershirt diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index d45ceda43fe..4c0a5b45be1 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -476,22 +476,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car randomise = SANITIZE_LIST(randomise) - if(gender == MALE) - hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_male_list) - facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_male_list) - underwear = sanitize_inlist(underwear, GLOB.underwear_m) - undershirt = sanitize_inlist(undershirt, GLOB.undershirt_m) - else if(gender == FEMALE) - hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_female_list) - facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_female_list) - underwear = sanitize_inlist(underwear, GLOB.underwear_f) - undershirt = sanitize_inlist(undershirt, GLOB.undershirt_f) - else - hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_list) - facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_list) - underwear = sanitize_inlist(underwear, GLOB.underwear_list) - undershirt = sanitize_inlist(undershirt, GLOB.undershirt_list) - + hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_list) + facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_list) + underwear = sanitize_inlist(underwear, GLOB.underwear_list) + undershirt = sanitize_inlist(undershirt, GLOB.undershirt_list) socks = sanitize_inlist(socks, GLOB.socks_list) age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age)) hair_color = sanitize_hexcolor(hair_color, 3, 0) diff --git a/modular_skyrat/modules/customization/modules/client/preferences.dm b/modular_skyrat/modules/customization/modules/client/preferences.dm index 41a654d0d4a..b33597e9d60 100644 --- a/modular_skyrat/modules/customization/modules/client/preferences.dm +++ b/modular_skyrat/modules/customization/modules/client/preferences.dm @@ -2144,33 +2144,17 @@ GLOBAL_LIST_INIT(food, list( if("hairstyle") needs_update = TRUE - var/new_hairstyle - if(gender == MALE) - new_hairstyle = input(user, "Choose your character's hairstyle:", "Character Preference") as null|anything in GLOB.hairstyles_male_list - else if(gender == FEMALE) - new_hairstyle = input(user, "Choose your character's hairstyle:", "Character Preference") as null|anything in GLOB.hairstyles_female_list - else - new_hairstyle = input(user, "Choose your character's hairstyle:", "Character Preference") as null|anything in GLOB.hairstyles_list + var/new_hairstyle = input(user, "Choose your character's hairstyle:", "Character Preference") as null|anything in GLOB.hairstyles_list if(new_hairstyle) hairstyle = new_hairstyle if("next_hairstyle") needs_update = TRUE - if (gender == MALE) - hairstyle = next_list_item(hairstyle, GLOB.hairstyles_male_list) - else if(gender == FEMALE) - hairstyle = next_list_item(hairstyle, GLOB.hairstyles_female_list) - else - hairstyle = next_list_item(hairstyle, GLOB.hairstyles_list) + hairstyle = next_list_item(hairstyle, GLOB.hairstyles_list) if("previous_hairstyle") needs_update = TRUE - if (gender == MALE) - hairstyle = previous_list_item(hairstyle, GLOB.hairstyles_male_list) - else if(gender == FEMALE) - hairstyle = previous_list_item(hairstyle, GLOB.hairstyles_female_list) - else - hairstyle = previous_list_item(hairstyle, GLOB.hairstyles_list) + hairstyle = previous_list_item(hairstyle, GLOB.hairstyles_list) if("facial") needs_update = TRUE @@ -2180,42 +2164,20 @@ GLOBAL_LIST_INIT(food, list( if("facial_hairstyle") needs_update = TRUE - var/new_facial_hairstyle - if(gender == MALE) - new_facial_hairstyle = input(user, "Choose your character's facial-hairstyle:", "Character Preference") as null|anything in GLOB.facial_hairstyles_male_list - else if(gender == FEMALE) - new_facial_hairstyle = input(user, "Choose your character's facial-hairstyle:", "Character Preference") as null|anything in GLOB.facial_hairstyles_female_list - else - new_facial_hairstyle = input(user, "Choose your character's facial-hairstyle:", "Character Preference") as null|anything in GLOB.facial_hairstyles_list + var/new_facial_hairstyle = input(user, "Choose your character's facial-hairstyle:", "Character Preference") as null|anything in GLOB.facial_hairstyles_list if(new_facial_hairstyle) facial_hairstyle = new_facial_hairstyle if("next_facehairstyle") needs_update = TRUE - if (gender == MALE) - facial_hairstyle = next_list_item(facial_hairstyle, GLOB.facial_hairstyles_male_list) - else if(gender == FEMALE) - facial_hairstyle = next_list_item(facial_hairstyle, GLOB.facial_hairstyles_female_list) - else - facial_hairstyle = next_list_item(facial_hairstyle, GLOB.facial_hairstyles_list) + facial_hairstyle = next_list_item(facial_hairstyle, GLOB.facial_hairstyles_list) if("previous_facehairstyle") needs_update = TRUE - if (gender == MALE) - facial_hairstyle = previous_list_item(facial_hairstyle, GLOB.facial_hairstyles_male_list) - else if (gender == FEMALE) - facial_hairstyle = previous_list_item(facial_hairstyle, GLOB.facial_hairstyles_female_list) - else - facial_hairstyle = previous_list_item(facial_hairstyle, GLOB.facial_hairstyles_list) + facial_hairstyle = previous_list_item(facial_hairstyle, GLOB.facial_hairstyles_list) if("underwear") - var/new_underwear - if(gender == MALE) - new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_m - else if(gender == FEMALE) - new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_f - else - new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_list + var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_list if(new_underwear) underwear = new_underwear @@ -2239,13 +2201,7 @@ GLOBAL_LIST_INIT(food, list( if("undershirt") needs_update = TRUE - var/new_undershirt - if(gender == MALE) - new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_m - else if(gender == FEMALE) - new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_f - else - new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_list + var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in GLOB.undershirt_list if(new_undershirt) undershirt = new_undershirt diff --git a/modular_skyrat/modules/customization/modules/client/preferences_savefile.dm b/modular_skyrat/modules/customization/modules/client/preferences_savefile.dm index c94137e474a..af43014caa6 100644 --- a/modular_skyrat/modules/customization/modules/client/preferences_savefile.dm +++ b/modular_skyrat/modules/customization/modules/client/preferences_savefile.dm @@ -485,22 +485,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car randomise = SANITIZE_LIST(randomise) - if(gender == MALE) - hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_male_list) - facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_male_list) - underwear = sanitize_inlist(underwear, GLOB.underwear_m) - undershirt = sanitize_inlist(undershirt, GLOB.undershirt_m) - else if(gender == FEMALE) - hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_female_list) - facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_female_list) - underwear = sanitize_inlist(underwear, GLOB.underwear_f) - undershirt = sanitize_inlist(undershirt, GLOB.undershirt_f) - else - hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_list) - facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_list) - underwear = sanitize_inlist(underwear, GLOB.underwear_list) - undershirt = sanitize_inlist(undershirt, GLOB.undershirt_list) - + hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_list) + facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_list) + underwear = sanitize_inlist(underwear, GLOB.underwear_list) + undershirt = sanitize_inlist(undershirt, GLOB.undershirt_list) socks = sanitize_inlist(socks, GLOB.socks_list) age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age)) hair_color = sanitize_hexcolor(hair_color, 3, 0)