From 33d50fddf720eabbb29d98cc65816eb0724aa4d8 Mon Sep 17 00:00:00 2001 From: nickstershovel <143797359+ariaworld@users.noreply.github.com> Date: Tue, 26 Sep 2023 21:21:48 +0200 Subject: [PATCH] Body morpher expansion. --- .../human/innate_abilities/customization.dm | 75 ++++++++++++++++++- 1 file changed, 73 insertions(+), 2 deletions(-) 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 1807759812..ea4761bab0 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", "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", "Cancel") if(select_alteration == "Body Color") var/new_color = input(owner, "Choose your skin color:", "Race change","#"+H.dna.features["mcolor"]) as color|null @@ -246,7 +246,7 @@ H.update_genitals() H.apply_overlay() H.give_genital(/obj/item/organ/genital/breasts) - +/// SPLURT EDIT START else if (select_alteration == "Butt Size") for(var/obj/item/organ/genital/butt/X in H.internal_organs) qdel(X) @@ -271,5 +271,76 @@ H.apply_overlay() H.give_genital(/obj/item/organ/genital/belly) + else if (select_alteration == "Body Size") + // Check if the user has the size_normalized component attached, to avoid body size accumulation bug + var/datum/component/size_normalized = H.GetComponent(/datum/component/size_normalized) + if (size_normalized) + to_chat(owner, "The normalizer prevents you from adjusting your entire body's size.") + return + else + var/new_body_size = input(owner, "Choose your desired sprite size: ([CONFIG_GET(number/body_size_min)*100]-[CONFIG_GET(number/body_size_max)*100]%)\nWarning: This may make your character look distorted. Additionally, any size under 100% takes a 10% maximum health penalty", "Character Preference", H.dna.features["body_size"]*100) as num|null + if(new_body_size) + var/chosen_size = clamp(new_body_size * 0.01, CONFIG_GET(number/body_size_min), CONFIG_GET(number/body_size_max)) + H.update_size(chosen_size) + + else if (select_alteration == "Genital Color") + var/genital_part = input(owner, "Select what part of your genitals to alter", "Genital Color", "cancel") in list("Penis", "Butt", "Balls", "Anus", "Vagina", "Breasts", "Belly", "Toggle genitals using skintone", "Cancel") + if(genital_part == "Toggle genitals using skintone") + var/use_skintone = input(owner, "Do you want to use your skin tone for all genitals? (Only works for Species that support Skin Tones)", "Genital Color") in list("Yes", "No") + if(use_skintone == "Yes") + H.dna.features["genitals_use_skintone"] = TRUE + else + H.dna.features["genitals_use_skintone"] = FALSE + else + var/hex_color = null + if (genital_part == "Penis") + hex_color = input(owner, "Choose your " + "penis" + " color:", "Genital Color", "#" + H.dna.features["cock_color"]) as color|null + genital_part = "cock" + else if (genital_part == "Vagina") + hex_color = input(owner, "Choose your " + "vagina" + " color:", "Genital Color", "#" + H.dna.features["vag_color"]) as color|null + genital_part = "vag" + else if (genital_part == "Balls") + hex_color = input(owner, "Choose your " + "balls" + " color:", "Genital Color", "#" + H.dna.features["balls_color"]) as color|null + genital_part = "balls" + else if (genital_part == "Breasts") + hex_color = input(owner, "Choose your " + "breasts" + " color:", "Genital Color", "#" + H.dna.features["breasts_color"]) as color|null + genital_part = "breasts" + else if (genital_part == "Butt") + hex_color = input(owner, "Choose your " + "butt" + " color:", "Genital Color", "#" + H.dna.features["butt_color"]) as color|null + genital_part = "butt" + else if (genital_part == "Anus") + hex_color = input(owner, "Choose your " + "anus" + " color:", "Genital Color", "#" + H.dna.features["anus_color"]) as color|null + genital_part = "anus" + else if (genital_part == "Belly") + hex_color = input(owner, "Choose your " + "belly" + " color:", "Genital Color", "#" + H.dna.features["belly_color"]) as color|null + genital_part = "belly" + + if (hex_color) + H.dna.features[genital_part + "_color"] = sanitize_hexcolor(hex_color, 6) + H.dna.features["genitals_use_skintone"] = FALSE + + H.update_genitals() + + else if (select_alteration == "Horns") + var/new_horns = input(owner, "Choose your character's horns:", "Character Preference") as null|anything in GLOB.horns_list + if(new_horns) + H.dna.features["horns"] = new_horns + + var/new_horn_color = input(owner, "Choose your character's horn color:", "Character Preference", "#" + H.dna.features["horns_color"]) as color|null + if(new_horn_color) + if (new_horn_color == "#000000" && H.dna.features["horns_color"] != "85615A") + H.dna.features["horns_color"] = "85615A" + else + H.dna.features["horns_color"] = sanitize_hexcolor(new_horn_color, 6) + + H.update_body() + + else if (select_alteration == "Hair Color") + var/new_hair_color = input(owner, "Choose your character's hair color:", "Character Preference", "#" + H.dna.features["hair_color"]) as color|null + if (new_hair_color) + H.hair_color = sanitize_hexcolor(new_hair_color, 6) + H.update_hair() + +/// SPLURT EDIT END else return