Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rubberized Shells #20270

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 24 additions & 25 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -934,64 +934,63 @@ 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"))
if("No")
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"
Expand Down
8 changes: 4 additions & 4 deletions code/modules/client/preference_setup/general/03_body.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -236,7 +236,7 @@ var/global/list/valid_bloodtypes = list(
out += "Species: <a href='?src=[REF(src)];show_species=1'>[pref.species]</a><br>"
out += "Blood Type: <a href='?src=[REF(src)];blood_type=1'>[pref.b_type]</a><br>"
if(has_flag(mob_species, HAS_SKIN_TONE))
out += "Skin Tone: <a href='?src=[REF(src)];skin_tone=1'>[-pref.s_tone + 35]/220</a><br>"
out += "Skin Tone: <a href='?src=[REF(src)];skin_tone=1'>[-pref.s_tone + 35]/[mob_species.upper_skin_tone_bound]</a><br>"
out += "Disabilities: <a href='?src=[REF(src)];trait_add=1'>Adjust</a><br>"
for(var/M in pref.disabilities)
out += " [M] <a href='?src=[REF(src)];trait_remove=[M]'>-</a><br>"
Expand Down Expand Up @@ -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"])
Expand Down
10 changes: 9 additions & 1 deletion code/modules/mob/living/carbon/human/species/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions code/modules/nano/modules/human_appearance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
7 changes: 7 additions & 0 deletions html/changelogs/geeves-shell_tones.yml
Original file line number Diff line number Diff line change
@@ -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."
Loading