[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 <jzo123@hotmail.com>
This commit is contained in:
SkyratBot
2021-05-02 00:55:58 +02:00
committed by GitHub
parent b58eb78c9e
commit 30b650bf76
4 changed files with 24 additions and 136 deletions
+8 -52
View File
@@ -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
+4 -16
View File
@@ -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)