I'm amazed this actually works fine.

This commit is contained in:
Ghommie
2020-04-14 21:58:37 +02:00
parent c774f18758
commit d84ef22f22
2 changed files with 18 additions and 16 deletions
+9 -9
View File
@@ -1547,7 +1547,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
underwear = new_underwear
if("undie_color")
var/n_undie_color = input(user, "Choose your underwear's color.", "Character Preference", undie_color) as color|null
var/n_undie_color = input(user, "Choose your underwear's color.", "Character Preference", "#[undie_color]") as color|null
if(n_undie_color)
undie_color = sanitize_hexcolor(n_undie_color)
@@ -1557,7 +1557,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
undershirt = new_undershirt
if("shirt_color")
var/n_shirt_color = input(user, "Choose your undershirt's color.", "Character Preference", shirt_color) as color|null
var/n_shirt_color = input(user, "Choose your undershirt's color.", "Character Preference", "#[shirt_color]") as color|null
if(n_shirt_color)
shirt_color = sanitize_hexcolor(n_shirt_color)
@@ -1567,7 +1567,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
socks = new_socks
if("socks_color")
var/n_socks_color = input(user, "Choose your socks' color.", "Character Preference", socks_color) as color|null
var/n_socks_color = input(user, "Choose your socks' color.", "Character Preference", "#[socks_color]") as color|null
if(n_socks_color)
socks_color = sanitize_hexcolor(n_socks_color)
@@ -1843,8 +1843,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/default = use_custom_skin_tone ? skin_tone : null
var/custom_tone = input(user, "Choose your custom skin tone:", "Character Preference", default) as color|null
if(custom_tone)
var/temp_hsv = RGBtoHSV(new_s_tone)
if(ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3])
var/temp_hsv = RGBtoHSV(custom_tone)
if(ReadHSV(temp_hsv)[3] < ReadHSV("#333333")[3]) // rgb(50,50,50)
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
else
use_custom_skin_tone = TRUE
@@ -1954,7 +1954,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/temp_hsv = RGBtoHSV(new_cockcolor)
if(new_cockcolor == "#000000")
features["cock_color"] = pref_species.default_color
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
else if(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
features["cock_color"] = sanitize_hexcolor(new_cockcolor)
else
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
@@ -1994,7 +1994,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/temp_hsv = RGBtoHSV(new_ballscolor)
if(new_ballscolor == "#000000")
features["balls_color"] = pref_species.default_color
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
else if(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
features["balls_color"] = sanitize_hexcolor(new_ballscolor)
else
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
@@ -2021,7 +2021,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/temp_hsv = RGBtoHSV(new_breasts_color)
if(new_breasts_color == "#000000")
features["breasts_color"] = pref_species.default_color
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
else if(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
features["breasts_color"] = sanitize_hexcolor(new_breasts_color)
else
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
@@ -2043,7 +2043,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/temp_hsv = RGBtoHSV(new_vagcolor)
if(new_vagcolor == "#000000")
features["vag_color"] = pref_species.default_color
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
else if(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3])
features["vag_color"] = sanitize_hexcolor(new_vagcolor)
else
to_chat(user,"<span class='danger'>Invalid color. Your color is not bright enough.</span>")
+9 -7
View File
@@ -361,7 +361,7 @@
species_color = ""
if(base_bp_icon != DEFAULT_BODYPART_ICON)
color_src = mut_colors ? MUTCOLORS : (H.dna.skin_tone_override && S.use_skintones == USE_SKINTONES_GRAYSCALE_CUSTOM) ? CUSTOM_SKINTONE : SKINTONE
color_src = mut_colors ? MUTCOLORS : ((H.dna.skin_tone_override && S.use_skintones == USE_SKINTONES_GRAYSCALE_CUSTOM) ? CUSTOM_SKINTONE : SKINTONE)
if(S.mutant_bodyparts["legs"])
if(body_zone == BODY_ZONE_L_LEG || body_zone == BODY_ZONE_R_LEG)
@@ -545,21 +545,23 @@
return
if(color_src) //TODO - add color matrix support for base species limbs
var/draw_color = mutation_color || species_color || GLOB.skin_tones[skin_tone]
var/draw_color = mutation_color || species_color
var/grayscale = FALSE
if(!draw_color) //check for custom skin tones.
draw_color = skin_tone
grayscale = color_src == CUSTOM_SKINTONE //Cause human (the species) parts states have a very pale pink hue.
if(!draw_color)
draw_color = SKINTONE2HEX(skin_tone)
grayscale = color_src == CUSTOM_SKINTONE //Cause human limbs have a very pale pink hue by def.
else
draw_color = "#[draw_color]"
if(draw_color)
if(grayscale)
limb.icon_state += "_g"
limb.color = "#[draw_color]"
limb.color = draw_color
if(aux_icons)
for(var/a in aux)
var/image/I = a
if(grayscale)
I.icon_state += "_g"
I.color = "#[draw_color]"
I.color = draw_color
if(!isnull(aux_marking))
for(var/a in auxmarking)
var/image/I = a