Underwear color (#45630)

About The Pull Request

    Changes our current underwear selection to greyscale so you can color them any way you like, just like hair.

    Removed duplicate underwear types that only served as a few color options(female_yellow, male_blue, ect.) Underwear with designs are unaffected(female_uk, male_commie, ect.)

    Added a new option in dressers to change underwear color.

    Changed some underwear names to fit the new option(female_red is now female_lace, ect.)

A9hAqkxgin
If all is well i plan on adding this to undershirts and socks too.

also HUGE thank you to nonfictiongames for the help!!!!
Why It's Good For The Game

More character customization in roleplaying game GOOD
Changelog

cl
add: Underwear can now have any color. (Your character will most likely be nude now so check your prefs!!)
add: Underwear color option in dressers
tweak: changed some underwear names
imagedel: deleted duplicate underwear

/cl
This commit is contained in:
Twaticus
2019-08-08 19:04:58 -04:00
committed by oranges
parent 8699c10857
commit 9dfa78cb47
9 changed files with 132 additions and 144 deletions
+10
View File
@@ -55,6 +55,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/gender = MALE //gender of character (well duh)
var/age = 30 //age of character
var/underwear = "Nude" //underwear type
var/underwear_color = "000" //underwear color
var/undershirt = "Nude" //undershirt type
var/socks = "Nude" //socks type
var/backbag = DBACKPACK //backpack type
@@ -229,6 +230,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<a href='?_src_=prefs;preference=rand_species'>Always Random Species: [be_random_species ? "Yes" : "No"]</A><br>"
dat += "<b>Underwear:</b><BR><a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
dat += "<b>Underwear Color:</b><BR><span style='border: 1px solid #161616; background-color: #[underwear_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=underwear_color;task=input'>Change</a><BR>"
dat += "<b>Undershirt:</b><BR><a href ='?_src_=prefs;preference=undershirt;task=input'>[undershirt]</a><BR>"
dat += "<b>Socks:</b><BR><a href ='?_src_=prefs;preference=socks;task=input'>[socks]</a><BR>"
dat += "<b>Backpack:</b><BR><a href ='?_src_=prefs;preference=bag;task=input'>[backbag]</a><BR>"
@@ -1023,6 +1025,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
facial_hair_style = random_facial_hair_style(gender)
if("underwear")
underwear = random_underwear(gender)
if("underwear_color")
underwear_color = random_short_color()
if("undershirt")
undershirt = random_undershirt(gender)
if("socks")
@@ -1165,6 +1169,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(new_underwear)
underwear = new_underwear
if("underwear_color")
var/new_underwear_color = input(user, "Choose your character's underwear color:", "Character Preference","#"+underwear_color) as color|null
if(new_underwear_color)
underwear_color = sanitize_hexcolor(new_underwear_color)
if("undershirt")
var/new_undershirt
if(gender == MALE)
@@ -1560,6 +1569,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
character.hair_style = hair_style
character.facial_hair_style = facial_hair_style
character.underwear = underwear
character.underwear_color = underwear_color
character.undershirt = undershirt
character.socks = socks
+7 -1
View File
@@ -5,7 +5,7 @@
// You do not need to raise this if you are adding new values that have sane defaults.
// Only raise this value when changing the meaning/format/name/layout of an existing value
// where you would want the updater procs below to run
#define SAVEFILE_VERSION_MAX 23
#define SAVEFILE_VERSION_MAX 24
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
@@ -109,6 +109,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
all_quirks -= "Physically Obstructive"
all_quirks -= "Neat"
all_quirks -= "NEET"
if(current_version < 24)
if (!(underwear in GLOB.underwear_list))
underwear = "Nude"
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
if(!ckey)
@@ -293,6 +296,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["hair_style_name"] >> hair_style
S["facial_style_name"] >> facial_hair_style
S["underwear"] >> underwear
S["underwear_color"] >> underwear_color
S["undershirt"] >> undershirt
S["socks"] >> socks
S["backbag"] >> backbag
@@ -380,6 +384,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
hair_color = sanitize_hexcolor(hair_color, 3, 0)
facial_hair_color = sanitize_hexcolor(facial_hair_color, 3, 0)
underwear_color = sanitize_hexcolor(underwear_color, 3, 0)
eye_color = sanitize_hexcolor(eye_color, 3, 0)
skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones)
backbag = sanitize_inlist(backbag, GLOB.backbaglist, initial(backbag))
@@ -433,6 +438,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["hair_style_name"] , hair_style)
WRITE_FILE(S["facial_style_name"] , facial_hair_style)
WRITE_FILE(S["underwear"] , underwear)
WRITE_FILE(S["underwear_color"] , underwear_color)
WRITE_FILE(S["undershirt"] , undershirt)
WRITE_FILE(S["socks"] , socks)
WRITE_FILE(S["backbag"] , backbag)