From caab49d5b38e7b118b658209d223f54f4d1a4b89 Mon Sep 17 00:00:00 2001 From: nickstershovel <143797359+ariaworld@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:32:14 +0200 Subject: [PATCH] Body Morpher: Skin Tone edit (LAST COMMIT) --- .../human/innate_abilities/customization.dm | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/innate_abilities/customization.dm b/code/modules/mob/living/carbon/human/innate_abilities/customization.dm index ea4761bab09f..0d6b5c8298c3 100644 --- a/code/modules/mob/living/carbon/human/innate_abilities/customization.dm +++ b/code/modules/mob/living/carbon/human/innate_abilities/customization.dm @@ -23,7 +23,7 @@ /datum/action/innate/ability/humanoid_customization/proc/change_form() var/mob/living/carbon/human/H = owner - var/select_alteration = input(owner, "Select what part of your form to alter", "Form Alteration", "cancel") in list("Body Color", "Eye Color","Hair Style", "Genitals", "Tail", "Snout", "Wings", "Markings", "Ears", "Taur body", "Penis", "Vagina", "Penis Length", "Breast Size", "Breast Shape", "Butt Size", "Belly Size", "Body Size", "Genital Color", "Horns", "Hair Color", "Cancel") + var/select_alteration = input(owner, "Select what part of your form to alter", "Form Alteration", "cancel") in list("Body Color", "Eye Color","Hair Style", "Genitals", "Tail", "Snout", "Wings", "Markings", "Ears", "Taur body", "Penis", "Vagina", "Penis Length", "Breast Size", "Breast Shape", "Butt Size", "Belly Size", "Body Size", "Genital Color", "Horns", "Hair Color", "Skin Tone (Non-Mutant)", "Cancel") if(select_alteration == "Body Color") var/new_color = input(owner, "Choose your skin color:", "Race change","#"+H.dna.features["mcolor"]) as color|null @@ -341,6 +341,26 @@ H.hair_color = sanitize_hexcolor(new_hair_color, 6) H.update_hair() + else if("Skin Tone (Non-Mutant)") // Skin tone, different than mutant color + var/list/choices = GLOB.skin_tones - GLOB.nonstandard_skin_tones + if(CONFIG_GET(flag/allow_custom_skintones)) + choices += "custom" + var/new_s_tone = input(owner, "Choose your character's skin tone: (This is different than the Body Color option, which changes your character's mutant colors)", "Character Preference") as null|anything in choices + if(new_s_tone) + if(new_s_tone == "custom") + var/default = H.skin_tone + var/custom_tone = input(owner, "Choose your character's skin tone: (This is different than the Body Color option, which changes your character's mutant colors)", "Character Preference", default) as color|null + if(custom_tone) + var/temp_hsv = RGBtoHSV(custom_tone) + if(ReadHSV(temp_hsv)[3] < ReadHSV("#333333")[3] && CONFIG_GET(flag/character_color_limits)) // rgb(50,50,50) //SPLURT EDIT + to_chat(owner,"Invalid color. Your color is not bright enough.") + else + H.skin_tone = custom_tone + else + H.skin_tone = new_s_tone + + H.update_body() + /// SPLURT EDIT END else return