diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index 58125b5497..0bdf27452b 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -105,3 +105,6 @@ //belly sound pref things #define NORMIE_HEARCHECK 4 + +//special species definitions +#define MINIMUM_MUTANT_COLOR "#202020" //this is how dark players mutant parts and skin can be diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 758685ede7..fa6bab0fcc 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -163,7 +163,7 @@ var/custom_tone = input(user, "Choose your custom skin tone:", "Race change", default) as color|null if(custom_tone) var/temp_hsv = RGBtoHSV(new_s_tone) - if(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) + if(ReadHSV(temp_hsv)[3] >= ReadHSV(MINIMUM_MUTANT_COLOR)[3]) to_chat(H,"Invalid color. Your color is not bright enough.") else H.skin_tone = custom_tone @@ -177,7 +177,7 @@ if(new_mutantcolor) var/temp_hsv = RGBtoHSV(new_mutantcolor) - if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright + if(ReadHSV(temp_hsv)[3] >= ReadHSV(MINIMUM_MUTANT_COLOR)[3]) // mutantcolors must be bright H.dna.features["mcolor"] = sanitize_hexcolor(new_mutantcolor) else diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 7a2c8156d4..1435e90193 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1630,7 +1630,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/temp_hsv = RGBtoHSV(new_mutantcolor) if(new_mutantcolor == "#000000") features["mcolor"] = pref_species.default_color - else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin + else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV(MINIMUM_MUTANT_COLOR)[3]) // mutantcolors must be bright, but only if they affect the skin features["mcolor"] = sanitize_hexcolor(new_mutantcolor, 6) else to_chat(user, "Invalid color. Your color is not bright enough.") @@ -1641,7 +1641,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/temp_hsv = RGBtoHSV(new_mutantcolor) if(new_mutantcolor == "#000000") features["mcolor2"] = pref_species.default_color - else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin + else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV(MINIMUM_MUTANT_COLOR)[3]) // mutantcolors must be bright, but only if they affect the skin features["mcolor2"] = sanitize_hexcolor(new_mutantcolor, 6) else to_chat(user, "Invalid color. Your color is not bright enough.") @@ -1652,7 +1652,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/temp_hsv = RGBtoHSV(new_mutantcolor) if(new_mutantcolor == "#000000") features["mcolor3"] = pref_species.default_color - else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin + else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV(MINIMUM_MUTANT_COLOR)[3]) // mutantcolors must be bright, but only if they affect the skin features["mcolor3"] = sanitize_hexcolor(new_mutantcolor, 6) else to_chat(user, "Invalid color. Your color is not bright enough.") @@ -1968,7 +1968,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(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) + else if(ReadHSV(temp_hsv)[3] >= ReadHSV(MINIMUM_MUTANT_COLOR)[3]) features["cock_color"] = sanitize_hexcolor(new_cockcolor, 6) else to_chat(user,"Invalid color. Your color is not bright enough.") @@ -2008,7 +2008,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(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) + else if(ReadHSV(temp_hsv)[3] >= ReadHSV(MINIMUM_MUTANT_COLOR)[3]) features["balls_color"] = sanitize_hexcolor(new_ballscolor, 6) else to_chat(user,"Invalid color. Your color is not bright enough.") @@ -2035,7 +2035,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(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) + else if(ReadHSV(temp_hsv)[3] >= ReadHSV(MINIMUM_MUTANT_COLOR)[3]) features["breasts_color"] = sanitize_hexcolor(new_breasts_color, 6) else to_chat(user,"Invalid color. Your color is not bright enough.") @@ -2057,7 +2057,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(ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) + else if(ReadHSV(temp_hsv)[3] >= ReadHSV(MINIMUM_MUTANT_COLOR)[3]) features["vag_color"] = sanitize_hexcolor(new_vagcolor, 6) else to_chat(user,"Invalid color. Your color is not bright enough.") diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 38f3111a23..a32c521902 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -466,7 +466,7 @@ var/new_color = input(owner, "Choose your skin color:", "Race change","#"+H.dna.features["mcolor"]) as color|null if(new_color) var/temp_hsv = RGBtoHSV(new_color) - if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright + if(ReadHSV(temp_hsv)[3] >= ReadHSV(MINIMUM_MUTANT_COLOR)[3]) // mutantcolors must be bright H.dna.features["mcolor"] = sanitize_hexcolor(new_color, 6) H.update_body() H.update_hair() diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 418062ce92..0d3e9a4139 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -565,7 +565,7 @@ var/diff_len = length(GLOB.skin_tones - GLOB.nonstandard_skin_tones) H.skin_tone = GLOB.skin_tones[min(diff_len, GLOB.skin_tones.Find(H.skin_tone) + 1)] else - H.skin_tone = H.dna.skin_tone_override = tan_mutant_color(H.dna.skin_tone_override, "#202020") + H.skin_tone = H.dna.skin_tone_override = tan_mutant_color(H.dna.skin_tone_override, MINIMUM_MUTANT_COLOR) if(MUTCOLORS in H.dna.species.species_traits) //take current alien color and darken it slightly H.dna.features["mcolor"] = tan_mutant_color(H.dna.features["mcolor"]) H.update_body() @@ -576,7 +576,7 @@ return ..() -/datum/reagent/spraytan/proc/tan_mutant_color(color, limit = "#7F7F7F") +/datum/reagent/spraytan/proc/tan_mutant_color(color, limit = MINIMUM_MUTANT_COLOR) var/newcolor = "" var/len = length(color) var/char = ""