diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 60eda61802..1312183750 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -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 diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index be783f387e..e32def727a 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -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) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 30291236e2..37ae8b3b09 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -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) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 6fb01f2d58..715829b56e 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -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))