diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index a144d163e59..149c2d17233 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -934,9 +934,9 @@ var/list/admin_verbs_cciaa = list( if(!check_rights(R_FUN)) return - var/mob/living/carbon/human/M = input("Select mob.", "Edit Appearance") as null|anything in GLOB.human_mob_list + var/mob/living/carbon/human/selected_human = input("Select mob.", "Edit Appearance") as null|anything in GLOB.human_mob_list - if(!istype(M, /mob/living/carbon/human)) + if(!istype(selected_human, /mob/living/carbon/human)) to_chat(usr, SPAN_WARNING("You can only do this to humans!")) return switch(alert("Are you sure you wish to edit this mob's appearance? Skrell, Unathi and Tajaran can result in unintended consequences.",,"Yes","No")) @@ -944,54 +944,53 @@ var/list/admin_verbs_cciaa = list( return var/new_facial = input("Please select facial hair color.", "Character Generation") as color if(new_facial) - M.r_facial = hex2num(copytext(new_facial, 2, 4)) - M.g_facial = hex2num(copytext(new_facial, 4, 6)) - M.b_facial = hex2num(copytext(new_facial, 6, 8)) + selected_human.r_facial = hex2num(copytext(new_facial, 2, 4)) + selected_human.g_facial = hex2num(copytext(new_facial, 4, 6)) + selected_human.b_facial = hex2num(copytext(new_facial, 6, 8)) var/new_hair = input("Please select hair color.", "Character Generation") as color if(new_facial) - M.r_hair = hex2num(copytext(new_hair, 2, 4)) - M.g_hair = hex2num(copytext(new_hair, 4, 6)) - M.b_hair = hex2num(copytext(new_hair, 6, 8)) + selected_human.r_hair = hex2num(copytext(new_hair, 2, 4)) + selected_human.g_hair = hex2num(copytext(new_hair, 4, 6)) + selected_human.b_hair = hex2num(copytext(new_hair, 6, 8)) var/new_eyes = input("Please select eye color.", "Character Generation") as color if(new_eyes) - M.r_eyes = hex2num(copytext(new_eyes, 2, 4)) - M.g_eyes = hex2num(copytext(new_eyes, 4, 6)) - M.b_eyes = hex2num(copytext(new_eyes, 6, 8)) - M.update_eyes() + selected_human.r_eyes = hex2num(copytext(new_eyes, 2, 4)) + selected_human.g_eyes = hex2num(copytext(new_eyes, 4, 6)) + selected_human.b_eyes = hex2num(copytext(new_eyes, 6, 8)) + selected_human.update_eyes() var/new_skin = input("Please select body color. This is for Tajaran, Unathi, and Skrell only!", "Character Generation") as color if(new_skin) - M.r_skin = hex2num(copytext(new_skin, 2, 4)) - M.g_skin = hex2num(copytext(new_skin, 4, 6)) - M.b_skin = hex2num(copytext(new_skin, 6, 8)) + selected_human.r_skin = hex2num(copytext(new_skin, 2, 4)) + selected_human.g_skin = hex2num(copytext(new_skin, 4, 6)) + selected_human.b_skin = hex2num(copytext(new_skin, 6, 8)) - var/new_tone = input("Please select skin tone level: 30-220. Higher is darker.", "Character Generation") as text + var/new_tone = input("Please select skin tone level: (Light [selected_human.species.lower_skin_tone_bound] - [selected_human.species.upper_skin_tone_bound] Dark). Higher is darker.", "Character Generation") as text if (new_tone) - M.s_tone = max(min(round(text2num(new_tone)), 220), 30) - M.s_tone = -M.s_tone + 35 + selected_human.s_tone = 35 - clamp(round(text2num(new_tone)), selected_human.species.lower_skin_tone_bound, selected_human.species.upper_skin_tone_bound) // hair var/new_hstyle = input(usr, "Select a hair style", "Grooming") as null|anything in GLOB.hair_styles_list if(new_hstyle) - M.h_style = new_hstyle + selected_human.h_style = new_hstyle // facial hair var/new_fstyle = input(usr, "Select a facial hair style", "Grooming") as null|anything in GLOB.facial_hair_styles_list if(new_fstyle) - M.f_style = new_fstyle + selected_human.f_style = new_fstyle var/new_gender = alert(usr, "Please select gender.", "Character Generation", "Male", "Female") if (new_gender) if(new_gender == "Male") - M.gender = MALE + selected_human.gender = MALE else - M.gender = FEMALE - M.update_hair() - M.update_body() - M.check_dna(M) + selected_human.gender = FEMALE + selected_human.update_hair() + selected_human.update_body() + selected_human.check_dna(selected_human) /client/proc/playernotes() set name = "Show Player Info" diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index 3b909ff38a1..32821b03138 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -196,7 +196,7 @@ var/global/list/valid_bloodtypes = list( pref.r_facial = sanitize_integer(pref.r_facial, 0, 255, initial(pref.r_facial)) pref.g_facial = sanitize_integer(pref.g_facial, 0, 255, initial(pref.g_facial)) pref.b_facial = sanitize_integer(pref.b_facial, 0, 255, initial(pref.b_facial)) - pref.s_tone = sanitize_integer(pref.s_tone, -185, 5, initial(pref.s_tone)) + pref.s_tone = sanitize_integer(pref.s_tone, -mob_species.upper_skin_tone_bound + 35, -mob_species.lower_skin_tone_bound + 35, initial(pref.s_tone)) pref.r_skin = sanitize_integer(pref.r_skin, 0, 255, initial(pref.r_skin)) pref.g_skin = sanitize_integer(pref.g_skin, 0, 255, initial(pref.g_skin)) pref.b_skin = sanitize_integer(pref.b_skin, 0, 255, initial(pref.b_skin)) @@ -236,7 +236,7 @@ var/global/list/valid_bloodtypes = list( out += "Species: [pref.species]
" out += "Blood Type: [pref.b_type]
" if(has_flag(mob_species, HAS_SKIN_TONE)) - out += "Skin Tone: [-pref.s_tone + 35]/220
" + out += "Skin Tone: [-pref.s_tone + 35]/[mob_species.upper_skin_tone_bound]
" out += "Disabilities: Adjust
" for(var/M in pref.disabilities) out += " [M] -
" @@ -611,9 +611,9 @@ var/global/list/valid_bloodtypes = list( else if(href_list["skin_tone"]) if(!has_flag(mob_species, HAS_SKIN_TONE)) return TOPIC_NOACTION - var/new_s_tone = tgui_input_number(user, "Choose your character's skin-tone. (Light 30 - 220 Dark)", "Character Preference", (-pref.s_tone) + 35, 220, 30) + var/new_s_tone = tgui_input_number(user, "Choose your character's skin-tone. (Light [mob_species.lower_skin_tone_bound] - [mob_species.upper_skin_tone_bound] Dark)", "Character Preference", (-pref.s_tone) + 35, mob_species.upper_skin_tone_bound, mob_species.lower_skin_tone_bound) if(new_s_tone && has_flag(mob_species, HAS_SKIN_TONE) && CanUseTopic(user)) - pref.s_tone = 35 - max(min( round(new_s_tone), 220),30) + pref.s_tone = 35 - clamp(round(new_s_tone), mob_species.lower_skin_tone_bound, mob_species.upper_skin_tone_bound) return TOPIC_REFRESH_UPDATE_PREVIEW else if(href_list["skin_color"]) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 3c36b009ebb..4958289c7a7 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -326,10 +326,18 @@ ) var/zombie_type //What zombie species they become - var/list/character_color_presets var/bodyfall_sound = /singleton/sound_category/bodyfall_sound //default, can be used for species specific falling sounds var/footsound = /singleton/sound_category/blank_footsteps //same as above but for footsteps without shoes + /// Sets the base "tint" of the species' sprite, which is then adjusted by the skin tone + var/list/character_color_presets + + /// The lower bound for the skin tone value, the lower, the "lighter" they'll appear + var/lower_skin_tone_bound = 30 + + /// The upper bound for the skin tone value, the higher, the "darker" they'll appear + var/upper_skin_tone_bound = 220 + var/list/alterable_internal_organs = list(BP_HEART, BP_EYES, BP_LUNGS, BP_LIVER, BP_BRAIN, BP_KIDNEYS, BP_STOMACH, BP_APPENDIX) //what internal organs can be changed in character setup var/list/possible_external_organs_modifications = list("Normal","Amputated","Prosthesis") /// These are the prefixes of the icon states in talk.dmi. diff --git a/code/modules/mob/living/carbon/human/species/station/ipc/ipc_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/ipc/ipc_subspecies.dm index 3269f2cd7c1..79ea59ed188 100644 --- a/code/modules/mob/living/carbon/human/species/station/ipc/ipc_subspecies.dm +++ b/code/modules/mob/living/carbon/human/species/station/ipc/ipc_subspecies.dm @@ -66,7 +66,8 @@ ) base_color = "#25032" - character_color_presets = list("Dark" = "#000000", "Warm" = "#250302", "Cold" = "#1e1e29") + + character_color_presets = list("Dark" = "#000000", "Warm" = "#250302", "Cold" = "#1e1e29", "Rubber" = "#000f36") sprint_temperature_factor = 1.3 move_charge_factor = 0.85 diff --git a/code/modules/nano/modules/human_appearance.dm b/code/modules/nano/modules/human_appearance.dm index f1cb72dcc6c..43f2c299a8b 100644 --- a/code/modules/nano/modules/human_appearance.dm +++ b/code/modules/nano/modules/human_appearance.dm @@ -76,9 +76,9 @@ . = TRUE if("skin_tone") if(can_change_skin_tone()) - var/new_s_tone = input(usr, "Choose your character's skin-tone:\n(Light 30 - 220 Dark)", "Skin Tone", -owner.s_tone + 35) as num|null + var/new_s_tone = input(usr, "Choose your character's skin-tone:\n(Light [owner.species.lower_skin_tone_bound] - [owner.species.upper_skin_tone_bound] Dark)", "Skin Tone", -owner.s_tone + 35) as num|null if(isnum(new_s_tone)) - new_s_tone = 35 - max(min( round(new_s_tone), 220),30) + new_s_tone = 35 - clamp(round(new_s_tone), owner.species.lower_skin_tone_bound, owner.species.upper_skin_tone_bound) . = owner.change_skin_tone(new_s_tone) if("skin_color") if(can_change_skin_color()) diff --git a/html/changelogs/geeves-shell_tones.yml b/html/changelogs/geeves-shell_tones.yml new file mode 100644 index 00000000000..12e4cd3e3be --- /dev/null +++ b/html/changelogs/geeves-shell_tones.yml @@ -0,0 +1,7 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Added a 'Rubber' skin preset for Shells in character creation, which makes their skin look cheap and uncanny." + - refactor: "Added backend support for species to have different max and min skin tone values, currently unused."