Merge pull request #11950 from Citadel-Station-13/Ghommie-patch-3

Fixing a little mistake with a config.
This commit is contained in:
kevinz000
2020-04-22 18:41:21 -07:00
committed by GitHub
4 changed files with 10 additions and 6 deletions

View File

@@ -479,5 +479,4 @@
integer = FALSE
//Allows players to set a hexadecimal color of their choice as skin tone, on top of the standard ones.
/datum/config_entry/number/allow_custom_skintones
config_entry_value = 1
/datum/config_entry/flag/allow_custom_skintones

View File

@@ -159,7 +159,7 @@
if(H.dna.species.use_skintones)
var/list/choices = GLOB.skin_tones
if(CONFIG_GET(number/allow_custom_skintones))
if(CONFIG_GET(flag/allow_custom_skintones))
choices += "custom"
var/new_s_tone = input(H, "Choose your skin tone:", "Race change") as null|anything in choices
if(new_s_tone)

View File

@@ -1837,7 +1837,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("s_tone")
var/list/choices = GLOB.skin_tones - GLOB.nonstandard_skin_tones
if(CONFIG_GET(number/allow_custom_skintones))
if(CONFIG_GET(flag/allow_custom_skintones))
choices += "custom"
var/new_s_tone = input(user, "Choose your character's skin tone:", "Character Preference") as null|anything in choices
if(new_s_tone)

View File

@@ -571,11 +571,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
hair_color = sanitize_hexcolor(hair_color, 3, 0)
facial_hair_color = sanitize_hexcolor(facial_hair_color, 3, 0)
eye_color = sanitize_hexcolor(eye_color, 3, 0)
use_custom_skin_tone = sanitize_integer(use_custom_skin_tone, FALSE, TRUE, initial(use_custom_skin_tone))
if(use_custom_skin_tone && CONFIG_GET(number/allow_custom_skintones))
var/static/allow_custom_skintones
if(isnull(allow_custom_skintones))
allow_custom_skintones = CONFIG_GET(flag/allow_custom_skintones)
use_custom_skin_tone = allow_custom_skintones ? sanitize_integer(use_custom_skin_tone, FALSE, TRUE, initial(use_custom_skin_tone)) : FALSE
if(use_custom_skin_tone)
skin_tone = sanitize_hexcolor(skin_tone, 6, TRUE, "#FFFFFF")
else
skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones - GLOB.nonstandard_skin_tones, initial(skin_tone))
horn_color = sanitize_hexcolor(horn_color, 3, FALSE)
wing_color = sanitize_hexcolor(wing_color, 3, FALSE, "#FFFFFF")
backbag = sanitize_inlist(backbag, GLOB.backbaglist, initial(backbag))