From a5722fdfc43db4256fe16394485b3d240327eef4 Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Fri, 12 Aug 2016 22:23:17 -0400 Subject: [PATCH] Overhaul, adds color2R/G/B helper procs, adds marking/head accessory/body accessory (colours included) randomization in char prefs. Color2R/G/B helper procs and PR overhaul suggested/co-authored by Krausus. --- code/__DEFINES/flags.dm | 1 + code/__HELPERS/game.dm | 17 -- code/__HELPERS/mobs.dm | 167 ++++++++++--- code/__HELPERS/type2type.dm | 23 +- code/datums/datacore.dm | 10 +- code/game/dna/dna2.dm | 30 +-- code/game/dna/dna2_helpers.dm | 43 ++-- code/game/dna/genes/vg_powers.dm | 37 ++- code/game/gamemodes/nuclear/nuclear.dm | 18 +- code/game/machinery/dye_generator.dm | 18 +- code/game/response_team.dm | 18 +- code/modules/client/preference/preferences.dm | 226 +++++++----------- .../client/preference/preferences_mysql.dm | 14 +- code/modules/customitems/item_defines.dm | 19 +- code/modules/lighting/light_source.dm | 8 +- .../mob/living/carbon/human/appearance.dm | 55 ++--- code/modules/mob/living/carbon/human/human.dm | 38 ++- .../mob/living/carbon/human/human_defines.dm | 17 +- .../living/carbon/human/species/station.dm | 2 +- .../mob/living/carbon/human/update_icons.dm | 38 +-- .../mob/new_player/preferences_setup.dm | 78 ++++-- .../mob/new_player/sprite_accessories.dm | 1 - code/modules/nano/modules/human_appearance.dm | 63 +++-- code/modules/surgery/limb_reattach.dm | 8 +- code/modules/surgery/organs/organ_icon.dm | 7 +- icons/mob/eyes.dmi | Bin 11894 -> 11881 bytes 26 files changed, 485 insertions(+), 471 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index e7966690a8e..61bc32d378e 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -62,6 +62,7 @@ #define HAS_HEAD_MARKINGS 512 #define HAS_BODY_MARKINGS 1024 #define HAS_TAIL_MARKINGS 2048 +#define HAS_MARKINGS HAS_HEAD_MARKINGS|HAS_BODY_MARKINGS|HAS_TAIL_MARKINGS #define TAIL_WAGGING 4096 #define NO_EYES 8192 #define HAS_FUR 16384 diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 5c11daabdba..2f551752ef7 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -401,23 +401,6 @@ mobs_found += M return mobs_found -/proc/GetRedPart(const/hexa) - return hex2num(copytext(hexa,2,4)) - -/proc/GetGreenPart(const/hexa) - return hex2num(copytext(hexa,4,6)) - -/proc/GetBluePart(const/hexa) - return hex2num(copytext(hexa,6,8)) - -/proc/GetHexColors(const/hexa) - return list( - GetRedPart(hexa), - GetGreenPart(hexa), - GetBluePart(hexa) - ) - - /proc/alone_in_area(var/area/the_area, var/mob/must_be_alone, var/check_type = /mob/living/carbon) var/area/our_area = get_area_master(the_area) for(var/C in living_mob_list) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 889a0824f35..f7a38cce758 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -1,3 +1,15 @@ +proc/GetOppositeDir(var/dir) + switch(dir) + if(NORTH) return SOUTH + if(SOUTH) return NORTH + if(EAST) return WEST + if(WEST) return EAST + if(SOUTHWEST) return NORTHEAST + if(NORTHWEST) return SOUTHEAST + if(NORTHEAST) return SOUTHWEST + if(SOUTHEAST) return NORTHWEST + return 0 + proc/random_underwear(gender, species = "Human") var/list/pick_list = list() switch(gender) @@ -34,57 +46,140 @@ proc/pick_species_allowed_underwear(list/all_picks, species) return pick(valid_picks) -proc/random_hair_style(var/gender, species = "Human") +proc/random_hair_style(var/gender, species = "Human", var/robot_head) var/h_style = "Bald" - var/list/valid_hairstyles = list() for(var/hairstyle in hair_styles_list) var/datum/sprite_accessory/S = hair_styles_list[hairstyle] - if(gender == MALE && S.gender == FEMALE) - continue - if(gender == FEMALE && S.gender == MALE) - continue - if( !(species in S.species_allowed)) - continue - valid_hairstyles[hairstyle] = hair_styles_list[hairstyle] + if((gender == MALE && S.gender == FEMALE) || (gender == FEMALE && S.gender == MALE)) + continue + if(species == "Machine") //If the user is a species who can have a robotic head... + var/datum/robolimb/robohead = all_robolimbs["[!robot_head ? "Morpheus Cyberkinetics" : robot_head]"] + if(species in S.species_allowed) //If this is a facial hair style native to the user's species... + if(robohead.is_monitor && (robohead.company in S.models_allowed)) //Check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list. + valid_hairstyles += hairstyle //Give them their hairstyles if they do. + continue + else //If they don't have the default head, they shouldn't be getting any hairstyles they wouldn't normally. + continue + else + if(robohead.is_monitor) //If the hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it. + continue + else + if("Human" in S.species_allowed) //If the user has a robotic humanoid head and the hairstyle can fit humans, let them use it as a wig. + valid_hairstyles += hairstyle + continue + else //If the user is not a species who can have robotic heads, use the default handling. + if(!(species in S.species_allowed)) //If the user's head is not of a species the hairstyle allows, skip it. Otherwise, add it to the list. + continue + valid_hairstyles += hairstyle if(valid_hairstyles.len) h_style = pick(valid_hairstyles) - return h_style + return h_style -proc/GetOppositeDir(var/dir) - switch(dir) - if(NORTH) return SOUTH - if(SOUTH) return NORTH - if(EAST) return WEST - if(WEST) return EAST - if(SOUTHWEST) return NORTHEAST - if(NORTHWEST) return SOUTHEAST - if(NORTHEAST) return SOUTHWEST - if(SOUTHEAST) return NORTHWEST - return 0 - -proc/random_facial_hair_style(var/gender, species = "Human") +proc/random_facial_hair_style(var/gender, species = "Human", var/robot_head) var/f_style = "Shaved" - - var/list/valid_facialhairstyles = list() + var/list/valid_facial_hairstyles = list() for(var/facialhairstyle in facial_hair_styles_list) var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] - if(gender == MALE && S.gender == FEMALE) - continue - if(gender == FEMALE && S.gender == MALE) - continue - if( !(species in S.species_allowed)) - continue - valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle] + if((gender == MALE && S.gender == FEMALE) || (gender == FEMALE && S.gender == MALE)) + continue + if(species == "Machine") //If the user is a species who can have a robotic head... + var/datum/robolimb/robohead = all_robolimbs["[!robot_head ? "Morpheus Cyberkinetics" : robot_head]"] + if(species in S.species_allowed) //If this is a facial hair style native to the user's species... + if(robohead.is_monitor && (robohead.company in S.models_allowed)) //Check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list. + valid_facial_hairstyles += facialhairstyle //Give them their facial hair styles if they do. + continue + else //If they don't have the default head, they shouldn't be getting any facial hair styles they wouldn't normally. + continue + else + if(robohead.is_monitor) //If the facial hair style is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it. + continue + else + if("Human" in S.species_allowed) //If the user has a robotic humanoid head and the facial hair style can fit humans, let them use it as a postiche. + valid_facial_hairstyles += facialhairstyle + continue + else //If the user is not a species who can have robotic heads, use the default handling. + if(!(species in S.species_allowed)) //If the user's head is not of a species the facial hair style allows, skip it. Otherwise, add it to the list. + continue + valid_facial_hairstyles += facialhairstyle - if(valid_facialhairstyles.len) - f_style = pick(valid_facialhairstyles) + if(valid_facial_hairstyles.len) + f_style = pick(valid_facial_hairstyles) - return f_style + return f_style + +proc/random_head_accessory(species = "Human") + var/ha_style = "None" + var/list/valid_head_accessories = list() + for(var/head_accessory in head_accessory_styles_list) + var/datum/sprite_accessory/S = head_accessory_styles_list[head_accessory] + + if(!(species in S.species_allowed)) + continue + valid_head_accessories += head_accessory + + if(valid_head_accessories.len) + ha_style = pick(valid_head_accessories) + + return ha_style + +proc/random_marking_style(var/location = "body", species = "Human", var/robot_head, var/body_accessory, var/alt_head) + var/m_style = "None" + var/list/valid_markings = list() + for(var/marking in marking_styles_list) + var/datum/sprite_accessory/body_markings/S = marking_styles_list[marking] + if(S.name == "None") + valid_markings += marking + continue + if(S.marking_location != location) //If the marking isn't for the location we desire, skip. + continue + if(!(species in S.species_allowed)) //If the user's head is not of a species the marking style allows, skip it. Otherwise, add it to the list. + continue + if(location == "tail") + if(!body_accessory) + if(S.tails_allowed) + continue + else + if(!S.tails_allowed || !(body_accessory in S.tails_allowed)) + continue + if(location == "head") + var/datum/sprite_accessory/body_markings/head/M = marking_styles_list[S.name] + if(species == "Machine")//If the user is a species that can have a robotic head... + var/datum/robolimb/robohead = all_robolimbs[robot_head] + if(!(S.models_allowed && (robohead.company in S.models_allowed))) //Make sure they don't get markings incompatible with their head. + continue + else if(alt_head && alt_head != "None") //If the user's got an alt head, validate markings for that head. + if(!(alt_head in M.heads_allowed)) + continue + else + if(M.heads_allowed) + continue + valid_markings += marking + + if(valid_markings.len) + m_style = pick(valid_markings) + + return m_style + +proc/random_body_accessory(species = "Vulpkanin") + var/body_accessory = null + var/list/valid_body_accessories = list() + for(var/B in body_accessory_by_name) + var/datum/body_accessory/A = body_accessory_by_name[B] + if(!istype(A)) + valid_body_accessories += "None" //The only null entry should be the "None" option. + continue + if(species in A.allowed_species) //If the user is not of a species the body accessory style allows, skip it. Otherwise, add it to the list. + valid_body_accessories += B + + if(valid_body_accessories.len) + body_accessory = pick(valid_body_accessories) + + return body_accessory proc/random_name(gender, species = "Human") @@ -301,7 +396,7 @@ proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=nul var/mob/living/L = M var/status switch(M.stat) - if(CONSCIOUS) + if(CONSCIOUS) status = "Alive" if(UNCONSCIOUS) status = "Unconscious" diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 005ef4c2fc9..fac97347e80 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -10,7 +10,7 @@ //Returns an integer given a hex input /proc/hex2num(hex) - if(!( istext(hex) )) + if(!(istext(hex))) return var/num = 0 @@ -59,6 +59,27 @@ hex = "0[hex]" return hex || "0" +//Returns an integer value for R of R/G/B given a hex color input. +/proc/color2R(hex) + if(!(istext(hex))) + return + + return hex2num(copytext(hex, 2, 4)) //Returning R + +//Returns an integer value for G of R/G/B given a hex color input. +/proc/color2G(hex) + if(!(istext(hex))) + return + + return hex2num(copytext(hex, 4, 6)) //Returning G + +//Returns an integer value for B of R/G/B given a hex color input. +/proc/color2B(hex) + if(!(istext(hex))) + return + + return hex2num(copytext(hex, 6, 8)) //Returning B + /proc/text2numlist(text, delimiter="\n") var/list/num_list = list() for(var/x in splittext(text, delimiter)) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index ea1a82fc6fd..fed9072e970 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -222,21 +222,19 @@ proc/get_id_photo(var/mob/living/carbon/human/H) //Markings if((H.species.bodyflags & HAS_HEAD_MARKINGS) || (H.species.bodyflags & HAS_BODY_MARKINGS)) - var/list/marking_styles = params2list(H.m_styles) - var/list/marking_colours = params2list(H.m_colours) if(H.species.bodyflags & HAS_BODY_MARKINGS) //Body markings. - var/body_marking = marking_styles["body"] + var/body_marking = H.m_styles["body"] var/datum/sprite_accessory/body_marking_style = marking_styles_list[body_marking] if(body_marking_style && body_marking_style.species_allowed) var/icon/b_marking_s = new/icon("icon" = body_marking_style.icon, "icon_state" = "[body_marking_style.icon_state]_s") - b_marking_s.Blend(rgb(hex2num(copytext(marking_colours["body"], 2, 4)), hex2num(copytext(marking_colours["body"], 4, 6)), hex2num(copytext(marking_colours["body"], 6, 8))), ICON_ADD) + b_marking_s.Blend(H.m_colours["body"], ICON_ADD) face_s.Blend(b_marking_s, ICON_OVERLAY) if(H.species.bodyflags & HAS_HEAD_MARKINGS) //Head markings. - var/head_marking = marking_styles["head"] + var/head_marking = H.m_styles["head"] var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking] if(head_marking_style && head_marking_style.species_allowed) var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s") - h_marking_s.Blend(rgb(hex2num(copytext(marking_colours["head"], 2, 4)), hex2num(copytext(marking_colours["head"], 4, 6)), hex2num(copytext(marking_colours["head"], 6, 8))), ICON_ADD) + h_marking_s.Blend(H.m_colours["head"], ICON_ADD) face_s.Blend(h_marking_s, ICON_OVERLAY) preview_icon.Blend(face_s, ICON_OVERLAY) diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index 114fcb1598f..8aa368eedcb 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -163,15 +163,11 @@ var/global/list/bad_blocks[0] // Markings if(!character.m_styles) - character.m_styles = "head=None;\ - body=None;\ - tail=None" + character.m_styles = initial(character.m_styles) - var/list/marking_styles = params2list(character.m_styles) - var/list/marking_colours = params2list(character.m_colours) - var/head_marks = marking_styles_list.Find(marking_styles["head"]) - var/body_marks = marking_styles_list.Find(marking_styles["body"]) - var/tail_marks = marking_styles_list.Find(marking_styles["tail"]) + var/head_marks = marking_styles_list.Find(character.m_styles["head"]) + var/body_marks = marking_styles_list.Find(character.m_styles["body"]) + var/tail_marks = marking_styles_list.Find(character.m_styles["tail"]) SetUIValueRange(DNA_UI_HAIR_R, H.r_hair, 255, 1) SetUIValueRange(DNA_UI_HAIR_G, H.g_hair, 255, 1) @@ -193,17 +189,17 @@ var/global/list/bad_blocks[0] SetUIValueRange(DNA_UI_HACC_G, H.g_headacc, 255, 1) SetUIValueRange(DNA_UI_HACC_B, H.b_headacc, 255, 1) - SetUIValueRange(DNA_UI_HEAD_MARK_R, hex2num(copytext(marking_colours["head"], 2, 4)), 255, 1) - SetUIValueRange(DNA_UI_HEAD_MARK_G, hex2num(copytext(marking_colours["head"], 4, 6)), 255, 1) - SetUIValueRange(DNA_UI_HEAD_MARK_B, hex2num(copytext(marking_colours["head"], 6, 8)), 255, 1) + SetUIValueRange(DNA_UI_HEAD_MARK_R, color2R(character.m_colours["head"]), 255, 1) + SetUIValueRange(DNA_UI_HEAD_MARK_G, color2G(character.m_colours["head"]), 255, 1) + SetUIValueRange(DNA_UI_HEAD_MARK_B, color2B(character.m_colours["head"]), 255, 1) - SetUIValueRange(DNA_UI_BODY_MARK_R, hex2num(copytext(marking_colours["body"], 2, 4)), 255, 1) - SetUIValueRange(DNA_UI_BODY_MARK_G, hex2num(copytext(marking_colours["body"], 4, 6)), 255, 1) - SetUIValueRange(DNA_UI_BODY_MARK_B, hex2num(copytext(marking_colours["body"], 6, 8)), 255, 1) + SetUIValueRange(DNA_UI_BODY_MARK_R, color2R(character.m_colours["body"]), 255, 1) + SetUIValueRange(DNA_UI_BODY_MARK_G, color2G(character.m_colours["body"]), 255, 1) + SetUIValueRange(DNA_UI_BODY_MARK_B, color2B(character.m_colours["body"]), 255, 1) - SetUIValueRange(DNA_UI_TAIL_MARK_R, hex2num(copytext(marking_colours["tail"], 2, 4)), 255, 1) - SetUIValueRange(DNA_UI_TAIL_MARK_G, hex2num(copytext(marking_colours["tail"], 4, 6)), 255, 1) - SetUIValueRange(DNA_UI_TAIL_MARK_B, hex2num(copytext(marking_colours["tail"], 6, 8)), 255, 1) + SetUIValueRange(DNA_UI_TAIL_MARK_R, color2R(character.m_colours["tail"]), 255, 1) + SetUIValueRange(DNA_UI_TAIL_MARK_G, color2G(character.m_colours["tail"]), 255, 1) + SetUIValueRange(DNA_UI_TAIL_MARK_B, color2B(character.m_colours["tail"]), 255, 1) SetUIValueRange(DNA_UI_SKIN_TONE, 35-character.s_tone, 220, 1) // Value can be negative. diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 9b0bd39dc9a..4e07171dfec 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -152,10 +152,9 @@ head_organ.g_headacc = dna.GetUIValueRange(DNA_UI_HACC_G, 255) head_organ.b_headacc = dna.GetUIValueRange(DNA_UI_HACC_B, 255) - var/list/marking_colours = params2list(H.m_colours) - marking_colours["head"] = "#[num2hex(dna.GetUIValueRange(DNA_UI_HEAD_MARK_R,255),2)][num2hex(dna.GetUIValueRange(DNA_UI_HEAD_MARK_G,255),2)][num2hex(dna.GetUIValueRange(DNA_UI_HEAD_MARK_B,255),2)]" - marking_colours["body"] = "#[num2hex(dna.GetUIValueRange(DNA_UI_BODY_MARK_R,255),2)][num2hex(dna.GetUIValueRange(DNA_UI_BODY_MARK_G,255),2)][num2hex(dna.GetUIValueRange(DNA_UI_BODY_MARK_B,255),2)]" - marking_colours["tail"] = "#[num2hex(dna.GetUIValueRange(DNA_UI_TAIL_MARK_R,255),2)][num2hex(dna.GetUIValueRange(DNA_UI_TAIL_MARK_G,255),2)][num2hex(dna.GetUIValueRange(DNA_UI_TAIL_MARK_B,255),2)]" + H.m_colours["head"] = rgb(dna.GetUIValueRange(DNA_UI_HEAD_MARK_R, 255), dna.GetUIValueRange(DNA_UI_HEAD_MARK_G, 255), dna.GetUIValueRange(DNA_UI_HEAD_MARK_B, 255)) + H.m_colours["body"] = rgb(dna.GetUIValueRange(DNA_UI_BODY_MARK_R, 255), dna.GetUIValueRange(DNA_UI_BODY_MARK_G, 255), dna.GetUIValueRange(DNA_UI_BODY_MARK_B, 255)) + H.m_colours["tail"] = rgb(dna.GetUIValueRange(DNA_UI_TAIL_MARK_R, 255), dna.GetUIValueRange(DNA_UI_TAIL_MARK_G, 255), dna.GetUIValueRange(DNA_UI_TAIL_MARK_B, 255)) H.update_eyes() @@ -167,18 +166,18 @@ H.change_gender(MALE, 0) //Hair - var/hair = dna.GetUIValueRange(DNA_UI_HAIR_STYLE,hair_styles_list.len) - if((0 < hair) && (hair <= hair_styles_list.len)) + var/hair = dna.GetUIValueRange(DNA_UI_HAIR_STYLE, hair_styles_list.len) + if((hair > 0) && (hair <= hair_styles_list.len)) head_organ.h_style = hair_styles_list[hair] //Facial Hair - var/beard = dna.GetUIValueRange(DNA_UI_BEARD_STYLE,facial_hair_styles_list.len) - if((0 < beard) && (beard <= facial_hair_styles_list.len)) + var/beard = dna.GetUIValueRange(DNA_UI_BEARD_STYLE, facial_hair_styles_list.len) + if((beard > 0) && (beard <= facial_hair_styles_list.len)) head_organ.f_style = facial_hair_styles_list[beard] //Head Accessories - var/headacc = dna.GetUIValueRange(DNA_UI_HACC_STYLE,head_accessory_styles_list.len) - if((0 < headacc) && (headacc <= head_accessory_styles_list.len)) + var/headacc = dna.GetUIValueRange(DNA_UI_HACC_STYLE, head_accessory_styles_list.len) + if((headacc > 0) && (headacc <= head_accessory_styles_list.len)) head_organ.ha_style = head_accessory_styles_list[headacc] var/number_head_marks = 0 @@ -194,23 +193,17 @@ number_tail_marks++ //Head Markings - var/head_marks = dna.GetUIValueRange(DNA_UI_HEAD_MARK_STYLE,marking_styles_list.len) - if((0 < head_marks) && (head_marks <= number_head_marks)) - var/list/marking_styles = params2list(H.m_styles) - marking_styles["head"] = marking_styles_list[head_marks] - H.m_styles = list2params(marking_styles) + var/head_marks = dna.GetUIValueRange(DNA_UI_HEAD_MARK_STYLE, marking_styles_list.len) + if((head_marks > 0) && (head_marks <= number_head_marks)) + H.m_styles["head"] = marking_styles_list[head_marks] //Body Markings - var/body_marks = dna.GetUIValueRange(DNA_UI_BODY_MARK_STYLE,marking_styles_list.len) - if((0 < body_marks) && (body_marks <= number_body_marks)) - var/list/marking_styles = params2list(H.m_styles) - marking_styles["body"] = marking_styles_list[body_marks] - H.m_styles = list2params(marking_styles) + var/body_marks = dna.GetUIValueRange(DNA_UI_BODY_MARK_STYLE, marking_styles_list.len) + if((body_marks > 0) && (body_marks <= number_body_marks)) + H.m_styles["body"] = marking_styles_list[body_marks] //Tail Markings - var/tail_marks = dna.GetUIValueRange(DNA_UI_TAIL_MARK_STYLE,marking_styles_list.len) - if((0 < tail_marks) && (tail_marks <= number_tail_marks)) - var/list/marking_styles = params2list(H.m_styles) - marking_styles["tail"] = marking_styles_list[tail_marks] - H.m_styles = list2params(marking_styles) + var/tail_marks = dna.GetUIValueRange(DNA_UI_TAIL_MARK_STYLE, marking_styles_list.len) + if((tail_marks > 0) && (tail_marks <= number_tail_marks)) + H.m_styles["tail"] = marking_styles_list[tail_marks] H.force_update_limbs() H.update_eyes() diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm index 0f1c700a17f..796bbdb2b24 100644 --- a/code/game/dna/genes/vg_powers.dm +++ b/code/game/dna/genes/vg_powers.dm @@ -44,7 +44,7 @@ else M.change_gender(FEMALE) - var/new_eyes = input("Please select eye color.", "Character Generation", rgb(M.r_eyes,M.g_eyes,M.b_eyes)) as null|color + var/new_eyes = input("Please select eye color.", "Character Generation", rgb(M.r_eyes, M.g_eyes, M.b_eyes)) as null|color if(new_eyes) M.change_eye_color(M.r_eyes, M.g_eyes, M.b_eyes) @@ -65,12 +65,13 @@ var/new_hair = input("Please select hair color.", "Character Generation", rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair)) as null|color if(new_hair) - M.change_hair_color(hex2num(copytext(new_hair, 2, 4)), hex2num(copytext(new_hair, 4, 6)), hex2num(copytext(new_hair, 6, 8))) + M.change_hair_color(color2R(new_hair), color2G(new_hair), color2B(new_hair)) var/datum/sprite_accessory/hair_style = hair_styles_list[head_organ.h_style] if(hair_style.secondary_theme && !hair_style.no_sec_colour) new_hair = input("Please select secondary hair color.", "Character Generation", rgb(head_organ.r_hair_sec, head_organ.g_hair_sec, head_organ.b_hair_sec)) as null|color - M.change_hair_color(hex2num(copytext(new_hair, 2, 4)), hex2num(copytext(new_hair, 4, 6)), hex2num(copytext(new_hair, 6, 8)), 1) + if(new_hair) + M.change_hair_color(color2R(new_hair), color2G(new_hair), color2B(new_hair), 1) // facial hair var/list/valid_facial_hairstyles = M.generate_valid_facial_hairstyles() @@ -81,12 +82,13 @@ var/new_facial = input("Please select facial hair color.", "Character Generation", rgb(head_organ.r_facial, head_organ.g_facial, head_organ.b_facial)) as null|color if(new_facial) - M.change_facial_hair_color(hex2num(copytext(new_facial, 2, 4)), hex2num(copytext(new_facial, 4, 6)), hex2num(copytext(new_facial, 6, 8))) + M.change_facial_hair_color(color2R(new_facial), color2G(new_facial), color2B(new_facial)) var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[head_organ.f_style] if(facial_hair_style.secondary_theme && !facial_hair_style.no_sec_colour) new_facial = input("Please select secondary facial hair color.", "Character Generation", rgb(head_organ.r_facial_sec, head_organ.g_facial_sec, head_organ.b_facial_sec)) as null|color - M.change_facial_hair_color(hex2num(copytext(new_facial, 2, 4)), hex2num(copytext(new_facial, 4, 6)), hex2num(copytext(new_facial, 6, 8)), 1) + if(new_facial) + M.change_facial_hair_color(color2R(new_facial), color2G(new_facial), color2B(new_facial), 1) //Head accessory. if(head_organ.species.bodyflags & HAS_HEAD_ACCESSORY) @@ -97,7 +99,7 @@ var/new_head_accessory_colour = input("Please select head accessory colour.", "Character Generation", rgb(head_organ.r_headacc, head_organ.g_headacc, head_organ.b_headacc)) as null|color if(new_head_accessory_colour) - M.change_head_accessory_color(hex2num(copytext(new_head_accessory_colour, 2, 4)), hex2num(copytext(new_head_accessory_colour, 4, 6)), hex2num(copytext(new_head_accessory_colour, 6, 8))) + M.change_head_accessory_color(color2R(new_head_accessory_colour), color2G(new_head_accessory_colour), color2B(new_head_accessory_colour)) //Body accessory. if(M.species.tail && M.species.bodyflags & HAS_TAIL) @@ -109,41 +111,32 @@ //Head markings. if(M.species.bodyflags & HAS_HEAD_MARKINGS) - var/list/marking_styles = params2list(M.m_styles) var/list/valid_head_markings = M.generate_valid_markings("head") - var/new_marking = input("Please select head marking style", "Character Generation", marking_styles["head"]) as null|anything in valid_head_markings + var/new_marking = input("Please select head marking style", "Character Generation", M.m_styles["head"]) as null|anything in valid_head_markings if(new_marking) M.change_markings(new_marking, "head") - var/list/marking_colours = params2list(M.m_colours) - marking_colours["head"] = sanitize_hexcolor(marking_colours["head"]) - var/new_marking_colour = input("Please select head marking colour.", "Character Generation", rgb(hex2num(copytext(marking_colours["head"], 2, 4)), hex2num(copytext(marking_colours["head"], 4, 6)), hex2num(copytext(marking_colours["head"], 6, 8)))) as null|color + var/new_marking_colour = input("Please select head marking colour.", "Character Generation", M.m_colours["head"]) as null|color if(new_marking_colour) M.change_marking_color(new_marking_colour, "head") //Body markings. if(M.species.bodyflags & HAS_BODY_MARKINGS) - var/list/marking_styles = params2list(M.m_styles) var/list/valid_body_markings = M.generate_valid_markings("body") - var/new_marking = input("Please select body marking style", "Character Generation", marking_styles["body"]) as null|anything in valid_body_markings + var/new_marking = input("Please select body marking style", "Character Generation", M.m_styles["body"]) as null|anything in valid_body_markings if(new_marking) M.change_markings(new_marking, "body") - var/list/marking_colours = params2list(M.m_colours) - marking_colours["body"] = sanitize_hexcolor(marking_colours["body"]) - var/new_marking_colour = input("Please select body marking colour.", "Character Generation", rgb(hex2num(copytext(marking_colours["body"], 2, 4)), hex2num(copytext(marking_colours["body"], 4, 6)), hex2num(copytext(marking_colours["body"], 6, 8)))) as null|color + var/new_marking_colour = input("Please select body marking colour.", "Character Generation", M.m_colours["body"]) as null|color if(new_marking_colour) M.change_marking_color(new_marking_colour, "body") //Tail markings. if(M.species.bodyflags & HAS_TAIL_MARKINGS) - var/list/marking_styles = params2list(M.m_styles) var/list/valid_tail_markings = M.generate_valid_markings("tail") - var/new_marking = input("Please select tail marking style", "Character Generation", marking_styles["tail"]) as null|anything in valid_tail_markings + var/new_marking = input("Please select tail marking style", "Character Generation", M.m_styles["tail"]) as null|anything in valid_tail_markings if(new_marking) M.change_markings(new_marking, "tail") - var/list/marking_colours = params2list(M.m_colours) - marking_colours["tail"] = sanitize_hexcolor(marking_colours["tail"]) - var/new_marking_colour = input("Please select tail marking colour.", "Character Generation", rgb(hex2num(copytext(marking_colours["tail"], 2, 4)), hex2num(copytext(marking_colours["tail"], 4, 6)), hex2num(copytext(marking_colours["tail"], 6, 8)))) as null|color + var/new_marking_colour = input("Please select tail marking colour.", "Character Generation", M.m_colours["tail"]) as null|color if(new_marking_colour) M.change_marking_color(new_marking_colour, "tail") @@ -175,7 +168,7 @@ if(M.species.bodyflags & HAS_SKIN_COLOR) var/new_body_colour = input("Please select body colour.", "Character Generation", rgb(M.r_skin, M.g_skin, M.b_skin)) as null|color if(new_body_colour) - M.change_skin_color(hex2num(copytext(new_body_colour, 2, 4)), hex2num(copytext(new_body_colour, 4, 6)), hex2num(copytext(new_body_colour, 6, 8))) + M.change_skin_color(color2R(new_body_colour), color2G(new_body_colour), color2B(new_body_colour)) M.update_dna() diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index a26f941188b..302b0975802 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -148,15 +148,15 @@ proc/issyndicate(mob/living/M as mob) if(prob(5)) facial_hair_style = pick(facial_hair_styles_list) - head_organ.r_facial = hex2num(copytext(hair_c, 2, 4)) - head_organ.g_facial = hex2num(copytext(hair_c, 4, 6)) - head_organ.b_facial = hex2num(copytext(hair_c, 6, 8)) - head_organ.r_hair = hex2num(copytext(hair_c, 2, 4)) - head_organ.g_hair = hex2num(copytext(hair_c, 4, 6)) - head_organ.b_hair = hex2num(copytext(hair_c, 6, 8)) - M.r_eyes = hex2num(copytext(eye_c, 2, 4)) - M.g_eyes = hex2num(copytext(eye_c, 4, 6)) - M.b_eyes = hex2num(copytext(eye_c, 6, 8)) + head_organ.r_facial = color2R(hair_c) + head_organ.g_facial = color2G(hair_c) + head_organ.b_facial = color2B(hair_c) + head_organ.r_hair = color2R(hair_c) + head_organ.g_hair = color2G(hair_c) + head_organ.b_hair = color2B(hair_c) + M.r_eyes = color2R(eye_c) + M.g_eyes = color2G(eye_c) + M.b_eyes = color2B(eye_c) M.s_tone = skin_tone head_organ.h_style = hair_style head_organ.f_style = facial_hair_style diff --git a/code/game/machinery/dye_generator.dm b/code/game/machinery/dye_generator.dm index 151478ddee6..73e590361a7 100644 --- a/code/game/machinery/dye_generator.dm +++ b/code/game/machinery/dye_generator.dm @@ -111,21 +111,21 @@ if(do_after(user, 50, target = H)) switch(what_to_dye) if("hair") - var/r_hair = hex2num(copytext(dye_color, 2, 4)) - var/g_hair = hex2num(copytext(dye_color, 4, 6)) - var/b_hair = hex2num(copytext(dye_color, 6, 8)) + var/r_hair = color2R(dye_color) + var/g_hair = color2G(dye_color) + var/b_hair = color2B(dye_color) if(H.change_hair_color(r_hair, g_hair, b_hair)) H.update_dna() if("facial hair") - var/r_facial = hex2num(copytext(dye_color, 2, 4)) - var/g_facial = hex2num(copytext(dye_color, 4, 6)) - var/b_facial = hex2num(copytext(dye_color, 6, 8)) + var/r_facial = color2R(dye_color) + var/g_facial = color2G(dye_color) + var/b_facial = color2B(dye_color) if(H.change_facial_hair_color(r_facial, g_facial, b_facial)) H.update_dna() if("body") - var/r_skin = hex2num(copytext(dye_color, 2, 4)) - var/g_skin = hex2num(copytext(dye_color, 4, 6)) - var/b_skin = hex2num(copytext(dye_color, 6, 8)) + var/r_skin = color2R(dye_color) + var/g_skin = color2G(dye_color) + var/b_skin = color2B(dye_color) if(H.change_skin_color(r_skin, g_skin, b_skin)) H.update_dna() user.visible_message("[user] finishes dying [M]'s [what_to_dye]!", "You finish dying [M]'s [what_to_dye]!") diff --git a/code/game/response_team.dm b/code/game/response_team.dm index abda62f9420..c6b51cecb57 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -167,15 +167,15 @@ var/ert_request_answered = 0 if(prob(5)) facial_hair_style = pick(facial_hair_styles_list) - head_organ.r_facial = hex2num(copytext(hair_c, 2, 4)) - head_organ.g_facial = hex2num(copytext(hair_c, 4, 6)) - head_organ.b_facial = hex2num(copytext(hair_c, 6, 8)) - head_organ.r_hair = hex2num(copytext(hair_c, 2, 4)) - head_organ.g_hair = hex2num(copytext(hair_c, 4, 6)) - head_organ.b_hair = hex2num(copytext(hair_c, 6, 8)) - M.r_eyes = hex2num(copytext(eye_c, 2, 4)) - M.g_eyes = hex2num(copytext(eye_c, 4, 6)) - M.b_eyes = hex2num(copytext(eye_c, 6, 8)) + head_organ.r_facial = color2R(hair_c) + head_organ.g_facial = color2G(hair_c) + head_organ.b_facial = color2B(hair_c) + head_organ.r_hair = color2R(hair_c) + head_organ.g_hair = color2G(hair_c) + head_organ.b_hair = color2B(hair_c) + M.r_eyes = color2R(eye_c) + M.g_eyes = color2G(eye_c) + M.b_eyes = color2B(eye_c) M.s_tone = skin_tone head_organ.h_style = hair_style head_organ.f_style = facial_hair_style diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 5f0d31f9c26..9b590651974 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -110,12 +110,16 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/r_headacc = 0 //Head accessory colour var/g_headacc = 0 //Head accessory colour var/b_headacc = 0 //Head accessory colour - var/m_styles = "head=None;\ - body=None;\ - tail=None" //Marking styles. - var/m_colours = "head=#000000;\ - body=#000000;\ - tail=#000000" //Marking colours. + var/list/m_styles = list( + "head" = "None", + "body" = "None", + "tail" = "None" + ) //Marking styles. + var/list/m_colours = list( + "head" = "#000000", + "body" = "#000000", + "tail" = "#000000" + ) //Marking colours. var/h_style = "Bald" //Hair type var/r_hair = 0 //Hair color var/g_hair = 0 //Hair color @@ -296,26 +300,17 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "Color [color_square(r_headacc, g_headacc, b_headacc)]
" if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. - var/list/marking_styles = params2list(m_styles) - var/list/marking_colours = params2list(m_colours) - marking_colours["head"] = sanitize_hexcolor(marking_colours["head"]) dat += "Head Markings: " - dat += "[marking_styles["head"]]" - dat += "Color [color_square(hex2num(copytext(marking_colours["head"], 2, 4)), hex2num(copytext(marking_colours["head"], 4, 6)), hex2num(copytext(marking_colours["head"], 6, 8)))]
" + dat += "[m_styles["head"]]" + dat += "Color [color_square(color2R(m_colours["head"]), color2G(m_colours["head"]), color2B(m_colours["head"]))]
" if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox")) //Species with body markings/tattoos. - var/list/marking_styles = params2list(m_styles) - var/list/marking_colours = params2list(m_colours) - marking_colours["body"] = sanitize_hexcolor(marking_colours["body"]) dat += "Body Markings: " - dat += "[marking_styles["body"]]" - dat += "Color [color_square(hex2num(copytext(marking_colours["body"], 2, 4)), hex2num(copytext(marking_colours["body"], 4, 6)), hex2num(copytext(marking_colours["body"], 6, 8)))]
" + dat += "[m_styles["body"]]" + dat += "Color [color_square(color2R(m_colours["body"]), color2G(m_colours["body"]), color2B(m_colours["body"]))]
" if(species in list("Vox", "Vulpkanin")) //Species with tail markings. - var/list/marking_styles = params2list(m_styles) - var/list/marking_colours = params2list(m_colours) - marking_colours["tail"] = sanitize_hexcolor(marking_colours["tail"]) dat += "Tail Markings: " - dat += "[marking_styles["tail"]]" - dat += "Color [color_square(hex2num(copytext(marking_colours["tail"], 2, 4)), hex2num(copytext(marking_colours["tail"], 4, 6)), hex2num(copytext(marking_colours["tail"], 6, 8)))]
" + dat += "[m_styles["tail"]]" + dat += "Color [color_square(color2R(m_colours["tail"]), color2G(m_colours["tail"]), color2B(m_colours["tail"]))]
" dat += "Hair: " dat += "[h_style]" @@ -1216,43 +1211,41 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts species = input("Please select a species", "Character Generation", null) in new_species if(prev_species != species) + var/datum/robolimb/robohead + if(species == "Machine") + var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]" + robohead = all_robolimbs[head_model] //grab one of the valid hair styles for the newly chosen species - var/list/valid_hairstyles = list() - for(var/hairstyle in hair_styles_list) - var/datum/sprite_accessory/S = hair_styles_list[hairstyle] - if(gender == MALE && S.gender == FEMALE) - continue - if(gender == FEMALE && S.gender == MALE) - continue - if(!(species in S.species_allowed)) - continue - - valid_hairstyles[hairstyle] = hair_styles_list[hairstyle] - - if(valid_hairstyles.len) - h_style = pick(valid_hairstyles) - else - //this shouldn't happen - h_style = hair_styles_list["Bald"] + h_style = random_hair_style(gender, species, robohead) //grab one of the valid facial hair styles for the newly chosen species - var/list/valid_facialhairstyles = list() - for(var/facialhairstyle in facial_hair_styles_list) - var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] - if(gender == MALE && S.gender == FEMALE) - continue - if(gender == FEMALE && S.gender == MALE) - continue - if(!(species in S.species_allowed)) - continue + f_style = random_facial_hair_style(gender, species, robohead) - valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle] - - if(valid_facialhairstyles.len) - f_style = pick(valid_facialhairstyles) + if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species that have head accessories. + ha_style = random_head_accessory(species) else - //this shouldn't happen - f_style = facial_hair_styles_list["Shaved"] + ha_style = "None" // No Vulp ears on Unathi + r_headacc = 0 + g_headacc = 0 + b_headacc = 0 + + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + m_styles["head"] = random_marking_style("head", species, robohead, body_accessory, alt_head) + else + m_styles["head"] = "None" + m_colours["head"] = "#000000" + + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox")) //Species with body markings/tattoos. + m_styles["body"] = random_marking_style("body", species, robohead, body_accessory, alt_head) + else + m_styles["body"] = "None" + m_colours["body"] = "#000000" + + if(species in list("Vox", "Vulpkanin")) //Species with tail markings. + m_styles["tail"] = random_marking_style("tail", species, robohead, body_accessory, alt_head) + else + m_styles["tail"] = "None" + m_colours["tail"] = "#000000" // Don't wear another species' underwear! var/datum/sprite_accessory/S = underwear_list[underwear] @@ -1267,32 +1260,17 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(!S || !(species in S.species_allowed)) socks = random_socks(gender, species) - //reset hair colour and skin colour - r_hair = 0 - g_hair = 0 - b_hair = 0 - r_hair_sec = 0 - g_hair_sec = 0 - b_hair_sec = 0 - r_facial = 0 - g_facial = 0 - b_facial = 0 - r_facial_sec = 0 - g_facial_sec = 0 - b_facial_sec = 0 - - s_tone = 0 + //reset skin tone and colour + if(species in list("Human", "Drask", "Vox")) + random_skin_tone(species) + else + s_tone = 0 if(!(species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine"))) r_skin = 0 g_skin = 0 b_skin = 0 - ha_style = "None" // No Vulp ears on Unathi - m_styles = "head=None;\ - body=None;\ - tail=None" // No Unathi markings on Tajara - alt_head = "None" //No alt heads on species that don't have them. body_accessory = null //no vulptail on humans damnit @@ -1340,9 +1318,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/input = "Choose your character's hair colour:" var/new_hair = input(user, input, "Character Preference", rgb(r_hair, g_hair, b_hair)) as color|null if(new_hair) - r_hair = hex2num(copytext(new_hair, 2, 4)) - g_hair = hex2num(copytext(new_hair, 4, 6)) - b_hair = hex2num(copytext(new_hair, 6, 8)) + r_hair = color2R(new_hair) + g_hair = color2G(new_hair) + b_hair = color2B(new_hair) if("secondary_hair") if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) @@ -1350,9 +1328,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(hair_style.secondary_theme && !hair_style.no_sec_colour) var/new_hair = input(user, "Choose your character's secondary hair colour:", "Character Preference", rgb(r_hair_sec, g_hair_sec, b_hair_sec)) as color|null if(new_hair) - r_hair_sec = hex2num(copytext(new_hair, 2, 4)) - g_hair_sec = hex2num(copytext(new_hair, 4, 6)) - b_hair_sec = hex2num(copytext(new_hair, 6, 8)) + r_hair_sec = color2R(new_hair) + g_hair_sec = color2G(new_hair) + b_hair_sec = color2B(new_hair) if("h_style") var/list/valid_hairstyles = list() @@ -1393,9 +1371,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/input = "Choose the colour of your your character's head accessory:" var/new_head_accessory = input(user, input, "Character Preference", rgb(r_headacc, g_headacc, b_headacc)) as color|null if(new_head_accessory) - r_headacc = hex2num(copytext(new_head_accessory, 2, 4)) - g_headacc = hex2num(copytext(new_head_accessory, 4, 6)) - b_headacc = hex2num(copytext(new_head_accessory, 6, 8)) + r_headacc = color2R(new_head_accessory) + g_headacc = color2G(new_head_accessory) + b_headacc = color2B(new_head_accessory) if("ha_style") if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with head accessories. @@ -1427,13 +1405,11 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/new_alt_head = input(user, "Choose your character's alternate head style:", "Character Preference") as null|anything in valid_alt_heads if(new_alt_head) alt_head = new_alt_head - var/list/marking_styles = params2list(m_styles) - if(marking_styles["head"]) - var/head_marking = marking_styles["head"] + if(m_styles["head"]) + var/head_marking = m_styles["head"] var/datum/sprite_accessory/body_markings/head/head_marking_style = marking_styles_list[head_marking] if(!head_marking_style.heads_allowed || !(alt_head in head_marking_style.heads_allowed)) - marking_styles["head"] = "None" - m_styles = list2params(marking_styles) + m_styles["head"] = "None" if("m_style_head") if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. @@ -1467,21 +1443,16 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts valid_markings[markingstyle] = marking_styles_list[markingstyle] - var/list/marking_styles = params2list(m_styles) - var/new_marking_style = input(user, "Choose the style of your character's head markings:", "Character Preference", marking_styles["head"]) as null|anything in valid_markings + var/new_marking_style = input(user, "Choose the style of your character's head markings:", "Character Preference", m_styles["head"]) as null|anything in valid_markings if(new_marking_style) - marking_styles["head"] = new_marking_style - m_styles = list2params(marking_styles) + m_styles["head"] = new_marking_style if("m_head_colour") if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. var/input = "Choose the colour of your your character's head markings:" - var/list/marking_colours = params2list(m_colours) - marking_colours["head"] = sanitize_hexcolor(marking_colours["head"]) - var/new_markings = input(user, input, "Character Preference", rgb(hex2num(copytext(marking_colours["head"], 2, 4)), hex2num(copytext(marking_colours["head"], 4, 6)), hex2num(copytext(marking_colours["head"], 6, 8)))) as color|null + var/new_markings = input(user, input, "Character Preference", m_colours["head"]) as color|null if(new_markings) - marking_colours["head"] = new_markings - m_colours = list2params(marking_colours) + m_colours["head"] = new_markings if("m_style_body") if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox")) //Species with body markings/tattoos. @@ -1496,21 +1467,16 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts valid_markings[markingstyle] = marking_styles_list[markingstyle] - var/list/marking_styles = params2list(m_styles) - var/new_marking_style = input(user, "Choose the style of your character's body markings:", "Character Preference", marking_styles["body"]) as null|anything in valid_markings + var/new_marking_style = input(user, "Choose the style of your character's body markings:", "Character Preference", m_styles["body"]) as null|anything in valid_markings if(new_marking_style) - marking_styles["body"] = new_marking_style - m_styles = list2params(marking_styles) + m_styles["body"] = new_marking_style if("m_body_colour") if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox")) //Species with body markings/tattoos. var/input = "Choose the colour of your your character's body markings:" - var/list/marking_colours = params2list(m_colours) - marking_colours["body"] = sanitize_hexcolor(marking_colours["body"]) - var/new_markings = input(user, input, "Character Preference", rgb(hex2num(copytext(marking_colours["body"], 2, 4)), hex2num(copytext(marking_colours["body"], 4, 6)), hex2num(copytext(marking_colours["body"], 6, 8)))) as color|null + var/new_markings = input(user, input, "Character Preference", m_colours["body"]) as color|null if(new_markings) - marking_colours["body"] = new_markings - m_colours = list2params(marking_colours) + m_colours["body"] = new_markings if("m_style_tail") if(species in list("Vox", "Vulpkanin")) //Species with tail markings. @@ -1531,22 +1497,16 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts valid_markings[markingstyle] = marking_styles_list[markingstyle] - var/list/marking_styles = params2list(m_styles) - var/new_marking_style = input(user, "Choose the style of your character's tail markings:", "Character Preference", marking_styles["tail"]) as null|anything in valid_markings - + var/new_marking_style = input(user, "Choose the style of your character's tail markings:", "Character Preference", m_styles["tail"]) as null|anything in valid_markings if(new_marking_style) - marking_styles["tail"] = new_marking_style - m_styles = list2params(marking_styles) + m_styles["tail"] = new_marking_style if("m_tail_colour") if(species in list("Vox", "Vulpkanin")) //Species with tail markings. var/input = "Choose the colour of your your character's tail markings:" - var/list/marking_colours = params2list(m_colours) - marking_colours["tail"] = sanitize_hexcolor(marking_colours["tail"]) - var/new_markings = input(user, input, "Character Preference", rgb(hex2num(copytext(marking_colours["tail"], 2, 4)), hex2num(copytext(marking_colours["tail"], 4, 6)), hex2num(copytext(marking_colours["tail"], 6, 8)))) as color|null + var/new_markings = input(user, input, "Character Preference", m_colours["tail"]) as color|null if(new_markings) - marking_colours["tail"] = new_markings - m_colours = list2params(marking_colours) + m_colours["tail"] = new_markings if("body_accessory") var/list/possible_body_accessories = list() @@ -1563,18 +1523,16 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/new_body_accessory = input(user, "Choose your body accessory:", "Character Preference") as null|anything in possible_body_accessories if(new_body_accessory) - var/list/marking_styles = params2list(m_styles) - marking_styles["tail"] = "None" - m_styles = list2params(marking_styles) + m_styles["tail"] = "None" body_accessory = (new_body_accessory == "None") ? null : new_body_accessory if("facial") if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) var/new_facial = input(user, "Choose your character's facial-hair colour:", "Character Preference", rgb(r_facial, g_facial, b_facial)) as color|null if(new_facial) - r_facial = hex2num(copytext(new_facial, 2, 4)) - g_facial = hex2num(copytext(new_facial, 4, 6)) - b_facial = hex2num(copytext(new_facial, 6, 8)) + r_facial = color2R(new_facial) + g_facial = color2G(new_facial) + b_facial = color2B(new_facial) if("secondary_facial") if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) @@ -1582,9 +1540,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(facial_hair_style.secondary_theme && !facial_hair_style.no_sec_colour) var/new_facial = input(user, "Choose your character's secondary facial-hair colour:", "Character Preference", rgb(r_facial_sec, g_facial_sec, b_facial_sec)) as color|null if(new_facial) - r_facial_sec = hex2num(copytext(new_facial, 2, 4)) - g_facial_sec = hex2num(copytext(new_facial, 4, 6)) - b_facial_sec = hex2num(copytext(new_facial, 6, 8)) + r_facial_sec = color2R(new_facial) + g_facial_sec = color2G(new_facial) + b_facial_sec = color2B(new_facial) if("f_style") var/list/valid_facialhairstyles = list() @@ -1664,9 +1622,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if("eyes") var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference", rgb(r_eyes, g_eyes, b_eyes)) as color|null if(new_eyes) - r_eyes = hex2num(copytext(new_eyes, 2, 4)) - g_eyes = hex2num(copytext(new_eyes, 4, 6)) - b_eyes = hex2num(copytext(new_eyes, 6, 8)) + r_eyes = color2R(new_eyes) + g_eyes = color2G(new_eyes) + b_eyes = color2B(new_eyes) if("s_tone") if(species == "Human" || species == "Drask") @@ -1682,9 +1640,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if((species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference", rgb(r_skin, g_skin, b_skin)) as color|null if(new_skin) - r_skin = hex2num(copytext(new_skin, 2, 4)) - g_skin = hex2num(copytext(new_skin, 4, 6)) - b_skin = hex2num(copytext(new_skin, 6, 8)) + r_skin = color2R(new_skin) + g_skin = color2G(new_skin) + b_skin = color2B(new_skin) if("ooccolor") @@ -1767,11 +1725,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/new_state = input(user, "What state do you wish the limb to be in?") as null|anything in valid_limb_states if(!new_state) return - var/list/marking_styles = params2list(m_styles) //Handle resetting of head markings if the head is changed. switch(new_state) if("Normal") if(limb == "head") - marking_styles["head"] = "None" + m_styles["head"] = "None" h_style = hair_styles_list["Bald"] f_style = facial_hair_styles_list["Shaved"] organ_data[limb] = null @@ -1825,7 +1782,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts alt_head = null h_style = hair_styles_list["Bald"] f_style = facial_hair_styles_list["Shaved"] - marking_styles["head"] = "None" + m_styles["head"] = "None" rlimb_data[limb] = choice organ_data[limb] = "cyborg" if(second_limb) @@ -1836,7 +1793,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts else rlimb_data[second_limb] = choice organ_data[second_limb] = "cyborg" - m_styles = list2params(marking_styles) //Pass the reset head markings back to the preference variable. if("organs") var/organ_name = input(user, "Which internal function do you want to change?") as null|anything in list("Heart", "Eyes") if(!organ_name) return @@ -2145,7 +2101,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts H.g_headacc = g_headacc H.b_headacc = b_headacc H.ha_style = ha_style - if((character.species.bodyflags & HAS_HEAD_MARKINGS) || (character.species.bodyflags & HAS_BODY_MARKINGS) || (character.species.bodyflags & HAS_TAIL_MARKINGS)) + if(character.species.bodyflags & HAS_MARKINGS) character.m_colours = m_colours character.m_styles = m_styles diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm index cd6177a08f1..6b99f2d101d 100644 --- a/code/modules/client/preference/preferences_mysql.dm +++ b/code/modules/client/preference/preferences_mysql.dm @@ -199,13 +199,13 @@ r_skin = text2num(query.item[21]) g_skin = text2num(query.item[22]) b_skin = text2num(query.item[23]) - m_colours = query.item[24] + m_colours = params2list(query.item[24]) r_headacc = text2num(query.item[25]) g_headacc = text2num(query.item[26]) b_headacc = text2num(query.item[27]) h_style = query.item[28] f_style = query.item[29] - m_styles = query.item[30] + m_styles = params2list(query.item[30]) ha_style = query.item[31] alt_head = query.item[32] r_eyes = text2num(query.item[33]) @@ -324,6 +324,8 @@ var/rlimblist var/playertitlelist var/gearlist + var/markingcolourslist = list2params(m_colours) + var/markingstyleslist = list2params(m_styles) if(!isemptylist(organ_data)) organlist = list2params(organ_data) if(!isemptylist(rlimb_data)) @@ -360,13 +362,13 @@ skin_red='[r_skin]', skin_green='[g_skin]', skin_blue='[b_skin]', - marking_colours='[m_colours]', + marking_colours='[markingcolourslist]', head_accessory_red='[r_headacc]', head_accessory_green='[g_headacc]', head_accessory_blue='[b_headacc]', hair_style_name='[sql_sanitize_text(h_style)]', facial_style_name='[sql_sanitize_text(f_style)]', - marking_styles='[m_styles]', + marking_styles='[markingstyleslist]', head_accessory_style_name='[sql_sanitize_text(ha_style)]', alt_head_name='[sql_sanitize_text(alt_head)]', eyes_red='[r_eyes]', @@ -444,9 +446,9 @@ '[r_facial]', '[g_facial]', '[b_facial]', '[r_facial_sec]', '[g_facial_sec]', '[b_facial_sec]', '[s_tone]', '[r_skin]', '[g_skin]', '[b_skin]', - '[m_colours]', + '[markingcolourslist]', '[r_headacc]', '[g_headacc]', '[b_headacc]', - '[sql_sanitize_text(h_style)]', '[sql_sanitize_text(f_style)]', '[m_styles]', '[sql_sanitize_text(ha_style)]', '[sql_sanitize_text(alt_head)]', + '[sql_sanitize_text(h_style)]', '[sql_sanitize_text(f_style)]', '[markingstyleslist]', '[sql_sanitize_text(ha_style)]', '[sql_sanitize_text(alt_head)]', '[r_eyes]', '[g_eyes]', '[b_eyes]', '[underwear]', '[undershirt]', '[backbag]', '[b_type]', '[alternate_option]', diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index a6dca0c51cb..ff78f16c556 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -47,8 +47,7 @@ to_chat(user, "[target] has no skin, how do you expect to tattoo them?") return - var/list/marking_styles = params2list(target.m_styles) - if(marking_styles["body"] != "None") + if(target.m_styles["body"] != "None") to_chat(user, "[target] already has body markings, any more would look silly!") return @@ -67,14 +66,8 @@ user.visible_message("[user] finishes the [tattoo_name] on [target].", "You finish the [tattoo_name].") if(!used) // No exploiting do_after to tattoo multiple folks. - var/list/marking_colours = params2list(target.m_colours) - marking_styles["body"] = tattoo_icon - marking_colours["body"] = "#[num2hex(tattoo_r,2)][num2hex(tattoo_g,2)][num2hex(tattoo_b,2)]" - - target.m_styles = list2params(marking_styles) - target.m_colours = list2params(marking_colours) - - target.update_markings() + target.change_markings(tattoo_icon, "body") + target.change_marking_color(rgb(tattoo_r, tattoo_g, tattoo_b), "body") playsound(src.loc, 'sound/items/Welder2.ogg', 20, 1) used = 1 @@ -106,9 +99,9 @@ if(!used) var/ink_color = input("Please select an ink color.", "Tattoo Ink Color", rgb(tattoo_r, tattoo_g, tattoo_b)) as color|null if(ink_color && !(user.incapacitated() || used) ) - tattoo_r = hex2num(copytext(ink_color, 2, 4)) - tattoo_g = hex2num(copytext(ink_color, 4, 6)) - tattoo_b = hex2num(copytext(ink_color, 6, 8)) + tattoo_r = color2R(ink_color) + tattoo_g = color2G(ink_color) + tattoo_b = color2B(ink_color) to_chat(user, "You change the color setting on the [src].") diff --git a/code/modules/lighting/light_source.dm b/code/modules/lighting/light_source.dm index da60e939987..fd92e6675f1 100644 --- a/code/modules/lighting/light_source.dm +++ b/code/modules/lighting/light_source.dm @@ -114,9 +114,9 @@ /datum/light_source/proc/parse_light_color() if(light_color) - lum_r = GetRedPart(light_color) / 255 - lum_g = GetGreenPart(light_color) / 255 - lum_b = GetBluePart(light_color) / 255 + lum_r = color2R(light_color) / 255 + lum_g = color2G(light_color) / 255 + lum_b = color2B(light_color) / 255 else lum_r = 1 lum_g = 1 @@ -195,7 +195,7 @@ effect_str.Cut() effect_turf.Cut() - + /datum/light_source/proc/forget_turf(turf/T) var/idx = effect_turf.Find(T) effect_turf.Cut(idx, idx + 1) diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index e94620c8b47..29313624e7c 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -63,8 +63,7 @@ return 1 /mob/living/carbon/human/proc/change_markings(var/marking_style, var/location = "body") - var/list/marking_styles = params2list(m_styles) - if(!marking_style || marking_styles[location] == marking_style || !(marking_style in marking_styles_list)) + if(!marking_style || m_styles[location] == marking_style || !(marking_style in marking_styles_list)) return var/datum/sprite_accessory/body_markings/marking = marking_styles_list[marking_style] @@ -93,8 +92,7 @@ if(!tail_marking.tails_allowed || !(body_accessory.name in tail_marking.tails_allowed)) return - marking_styles[location] = marking_style - m_styles = list2params(marking_styles) + m_styles[location] = marking_style if(location == "tail") stop_tail_wagging() @@ -115,9 +113,7 @@ if(!found) return - var/list/marking_styles = params2list(m_styles) - marking_styles["tail"] = "None" - m_styles = list2params(marking_styles) + m_styles["tail"] = "None" update_tail_layer() return 1 @@ -129,13 +125,11 @@ H.alt_head = alternate_head //Handle head markings if they're incompatible with the new alt head. - var/list/marking_styles = params2list(m_styles) - if(marking_styles["head"]) - var/head_marking = marking_styles["head"] + if(m_styles["head"]) + var/head_marking = m_styles["head"] var/datum/sprite_accessory/body_markings/head/head_marking_style = marking_styles_list[head_marking] if(!head_marking_style.heads_allowed || !(H.alt_head in head_marking_style.heads_allowed)) - marking_styles["head"] = "None" - m_styles = list2params(marking_styles) + m_styles["head"] = "None" update_markings() update_body(1, 1) //Update the body and force limb icon regeneration to update the head with the new icon. @@ -145,8 +139,7 @@ reset_head_hair() reset_facial_hair() reset_head_accessory() - var/list/marking_styles = params2list(m_styles) - if(marking_styles["head"] && marking_styles["head"] != "None") //Resets head markings. + if(m_styles["head"] && m_styles["head"] != "None") //Resets head markings. reset_markings() /mob/living/carbon/human/proc/reset_head_hair() @@ -172,25 +165,22 @@ /mob/living/carbon/human/proc/reset_markings(var/location) var/list/valid_markings - var/list/marking_styles = params2list(m_styles) if(location) valid_markings = generate_valid_markings(location) if(valid_markings.len) - marking_styles[location] = pick(valid_markings) + m_styles[location] = pick(valid_markings) else //this shouldn't happen - marking_styles[location] = "None" + m_styles[location] = "None" else for(var/m_location in list("head", "body", "tail")) valid_markings = generate_valid_markings(m_location) if(valid_markings.len) - marking_styles[m_location] = pick(valid_markings) + m_styles[m_location] = pick(valid_markings) else //this shouldn't happen - marking_styles[m_location] = "None" - - m_styles = list2params(marking_styles) + m_styles[m_location] = "None" update_markings() stop_tail_wagging() @@ -270,13 +260,10 @@ return 1 /mob/living/carbon/human/proc/change_marking_color(var/colour, var/location = "body") - var/list/marking_colours = params2list(m_colours) - marking_colours[location] = sanitize_hexcolor(marking_colours[location]) - if(colour == marking_colours[location]) + if(colour == m_colours[location]) return - marking_colours[location] = colour - m_colours = list2params(marking_colours) + m_colours[location] = colour if(location == "tail") update_tail_layer() @@ -339,7 +326,7 @@ if(H.species.flags & ALL_RPARTS) //If the user is a species who can have a robotic head... var/datum/robolimb/robohead = all_robolimbs[H.model] if(!H) - return + return //No head, no hair. if(H.species.name in S.species_allowed) //If this is a hairstyle native to the user's species... if(robohead.is_monitor && (robohead.company in S.models_allowed)) //Check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list. valid_hairstyles += hairstyle //Give them their hairstyles if they do. @@ -350,7 +337,7 @@ if(robohead.is_monitor) //If the hair style is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it. continue else - if("Human" in S.species_allowed) //If the user has a robotic head and the hairstyle can fit humans, let them use it as a wig for their humanoid robot head. + if("Human" in S.species_allowed) //If the user has a robotic humanoid head and the hairstyle can fit humans, let them use it as a wig. valid_hairstyles += hairstyle continue else //If the user is not a species who can have robotic heads, use the default handling. @@ -371,7 +358,7 @@ if(H.species.flags & ALL_RPARTS) //If the user is a species who can have a robotic head... var/datum/robolimb/robohead = all_robolimbs[H.model] if(!H) - continue // No head, no hair + return //No head, no hair. if(H.species.name in S.species_allowed) //If this is a facial hair style native to the user's species... if(robohead.is_monitor && (robohead.company in S.models_allowed)) //Check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list. valid_facial_hairstyles += facialhairstyle //Give them their facial hair styles if they do. @@ -379,11 +366,10 @@ else //If they don't have the default head, they shouldn't be getting any facial hair styles they wouldn't normally. continue else - if(robohead.is_monitor) //If the facial hair style is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it. continue else - if("Human" in S.species_allowed) //If the user has a robotic head and the facial hair style can fit humans, let them use it as a postiche for their humanoid robot head. + if("Human" in S.species_allowed) //If the user has a robotic humanoid head and the facial hair style can fit humans, let them use it as a postiche. valid_facial_hairstyles += facialhairstyle continue else //If the user is not a species who can have robotic heads, use the default handling. @@ -448,11 +434,10 @@ valid_body_accessories = body_accessory_by_name.Copy() else if(!istype(A)) - valid_body_accessories += "None" //The only null entry should be the "None" option. + valid_body_accessories["None"] = "None" //The only null entry should be the "None" option. continue - if(!(species.name in A.allowed_species)) //If the user is not of a species the body accessory style allows, skip it. Otherwise, add it to the list. - continue - valid_body_accessories += B + if(species.name in A.allowed_species) //If the user is not of a species the body accessory style allows, skip it. Otherwise, add it to the list. + valid_body_accessories += B return valid_body_accessories diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index ab176e6912f..d42c48bff13 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1539,9 +1539,9 @@ if(species.base_color && default_colour) //Apply colour. - r_skin = hex2num(copytext(species.base_color, 2, 4)) - g_skin = hex2num(copytext(species.base_color, 4, 6)) - b_skin = hex2num(copytext(species.base_color, 6, 8)) + r_skin = color2R(species.base_color) + g_skin = color2G(species.base_color) + b_skin = color2B(species.base_color) else r_skin = 0 g_skin = 0 @@ -1563,25 +1563,25 @@ if(species.default_hair_colour) //Apply colour. - H.r_hair = hex2num(copytext(species.default_hair_colour, 2, 4)) - H.g_hair = hex2num(copytext(species.default_hair_colour, 4, 6)) - H.b_hair = hex2num(copytext(species.default_hair_colour, 6, 8)) + H.r_hair = color2R(species.default_hair_colour) + H.g_hair = color2G(species.default_hair_colour) + H.b_hair = color2B(species.default_hair_colour) else H.r_hair = 0 H.g_hair = 0 H.b_hair = 0 if(species.default_fhair_colour) - H.r_facial = hex2num(copytext(species.default_fhair_colour, 2, 4)) - H.g_facial = hex2num(copytext(species.default_fhair_colour, 4, 6)) - H.b_facial = hex2num(copytext(species.default_fhair_colour, 6, 8)) + H.r_facial = color2R(species.default_fhair_colour) + H.g_facial = color2G(species.default_fhair_colour) + H.b_facial = color2B(species.default_fhair_colour) else H.r_facial = 0 H.g_facial = 0 H.b_facial = 0 if(species.default_headacc_colour) - H.r_headacc = hex2num(copytext(species.default_headacc_colour, 2, 4)) - H.g_headacc = hex2num(copytext(species.default_headacc_colour, 4, 6)) - H.b_headacc = hex2num(copytext(species.default_headacc_colour, 6, 8)) + H.r_headacc = color2R(species.default_headacc_colour) + H.g_headacc = color2G(species.default_headacc_colour) + H.b_headacc = color2B(species.default_headacc_colour) else H.r_headacc = 0 H.g_headacc = 0 @@ -1693,17 +1693,13 @@ if(!head_organ) return if(!robohead.is_monitor) //If they've got a prosthetic head and it isn't a monitor, they've no screen to adjust. Instead, let them change the colour of their optics! - var/list/marking_colours = params2list(m_colours) - marking_colours["head"] = sanitize_hexcolor(marking_colours["head"]) - var/optic_colour = input(src, "Select optic colour", rgb(hex2num(copytext(marking_colours["head"], 2, 4)), hex2num(copytext(marking_colours["head"], 4, 6)), hex2num(copytext(marking_colours["head"], 6, 8)))) as color|null + var/optic_colour = input(src, "Select optic colour", m_colours["head"]) as color|null if(incapacitated()) to_chat(src, "You were interrupted while changing the colour of your optics.") return if(optic_colour) - marking_colours["head"] = optic_colour - m_colours = list2params(marking_colours) + change_markings(optic_colour, "head") - update_markings() else if(robohead.is_monitor) //Means that the character's head is a monitor (has a screen). Time to customize. var/list/hair = list() for(var/i in hair_styles_list) @@ -1711,14 +1707,12 @@ if((head_organ.species.name in tmp_hair.species_allowed) && (robohead.company in tmp_hair.models_allowed)) //Populate the list of available monitor styles only with styles that the monitor-head is allowed to use. hair += i - var/new_style = input(src, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair + var/new_style = input(src, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair if(incapacitated()) to_chat(src, "You were interrupted while changing your monitor display.") return if(new_style) - head_organ.h_style = new_style - - update_hair() + change_hair(new_style) //Putting a couple of procs here that I don't know where else to dump. //Mostly going to be used for Vox and Vox Armalis, but other human mobs might like them (for adminbuse). diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 0626c89fa1f..adf951fad03 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -4,12 +4,17 @@ var/global/default_martial_art = new/datum/martial_art hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,NATIONS_HUD) //Marking colour and style - var/m_colours = "head=#000000;\ - body=#000000;\ - tail=#000000" - var/m_styles = "head=None;\ - body=None;\ - tail=None" + var/list/m_colours = list( + "head" = "#000000", + "body" = "#000000", + "tail" = "#000000" + ) + + var/list/m_styles = list( + "head" = "None", + "body" = "None", + "tail" = "None" + ) //Eye colour var/r_eyes = 0 diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index 3577209ecd5..6b166f04c0c 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -162,7 +162,7 @@ flags = HAS_LIPS clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = FEET_PADDED | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_HEAD_ACCESSORY | HAS_HEAD_MARKINGS | HAS_BODY_MARKINGS | HAS_TAIL_MARKINGS | HAS_SKIN_COLOR | HAS_FUR + bodyflags = FEET_PADDED | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | HAS_FUR dietflags = DIET_OMNI reagent_tag = PROCESS_ORG flesh_color = "#966464" diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 130ea34f93d..a7afed9976b 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -366,31 +366,25 @@ var/global/list/damage_icon_parts = list() //Base icon. var/icon/markings_standing = new/icon('icons/mob/body_accessory.dmi',"accessory_none_s") - //Prep marking styles and colours. - var/list/marking_styles = params2list(m_styles) - var/list/marking_colours = params2list(m_colours) - //Body markings. var/obj/item/organ/external/chest/chest_organ = get_organ("chest") - if(chest_organ && !chest_organ.is_stump() && !(chest_organ.status & ORGAN_DESTROYED) && marking_styles["body"]) - var/body_marking = marking_styles["body"] + if(chest_organ && !chest_organ.is_stump() && !(chest_organ.status & ORGAN_DESTROYED) && m_styles["body"]) + var/body_marking = m_styles["body"] var/datum/sprite_accessory/body_marking_style = marking_styles_list[body_marking] if(body_marking_style && body_marking_style.species_allowed && (species.name in body_marking_style.species_allowed)) var/icon/b_marking_s = new/icon("icon" = body_marking_style.icon, "icon_state" = "[body_marking_style.icon_state]_s") if(body_marking_style.do_colouration) - marking_colours["body"] = sanitize_hexcolor(marking_colours["body"]) - b_marking_s.Blend(rgb(hex2num(copytext(marking_colours["body"], 2, 4)), hex2num(copytext(marking_colours["body"], 4, 6)), hex2num(copytext(marking_colours["body"], 6, 8))), ICON_ADD) + b_marking_s.Blend(m_colours["body"], ICON_ADD) markings_standing.Blend(b_marking_s, ICON_OVERLAY) //Head markings. var/obj/item/organ/external/head/head_organ = get_organ("head") - if(head_organ && !head_organ.is_stump() && !(head_organ.status & ORGAN_DESTROYED) && marking_styles["head"]) //If the head is destroyed, forget the head markings. This prevents floating optical markings on decapitated IPCs, for example. - var/head_marking = marking_styles["head"] + if(head_organ && !head_organ.is_stump() && !(head_organ.status & ORGAN_DESTROYED) && m_styles["head"]) //If the head is destroyed, forget the head markings. This prevents floating optical markings on decapitated IPCs, for example. + var/head_marking = m_styles["head"] var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking] if(head_marking_style && head_marking_style.species_allowed && (head_organ.species.name in head_marking_style.species_allowed)) var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s") if(head_marking_style.do_colouration) - marking_colours["head"] = sanitize_hexcolor(marking_colours["head"]) - h_marking_s.Blend(rgb(hex2num(copytext(marking_colours["head"], 2, 4)), hex2num(copytext(marking_colours["head"], 4, 6)), hex2num(copytext(marking_colours["head"], 6, 8))), ICON_ADD) + h_marking_s.Blend(m_colours["head"], ICON_ADD) markings_standing.Blend(h_marking_s, ICON_OVERLAY) overlays_standing[MARKINGS_LAYER] = image(markings_standing) @@ -408,7 +402,7 @@ var/global/list/damage_icon_parts = list() return //masks and helmets can obscure our head accessory - if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR))) + if((head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR))) if(update_icons) update_icons() return @@ -1147,16 +1141,13 @@ var/global/list/damage_icon_parts = list() If the species' tail is overlapped by limbs, this will be only the N direction icon so tails can still appear on the outside of uniforms and such. Otherwise, since the user's tail isn't overlapped by limbs, it will be a full icon with all directions. */ - var/list/marking_styles = params2list(m_styles) var/icon/tail_marking_icon var/datum/sprite_accessory/body_markings/tail/tail_marking_style - if(marking_styles["tail"] != "None" && (species.bodyflags & HAS_TAIL_MARKINGS)) - var/tail_marking = marking_styles["tail"] - var/list/marking_colours = params2list(m_colours) - marking_colours["tail"] = sanitize_hexcolor(marking_colours["tail"]) + if(m_styles["tail"] != "None" && (species.bodyflags & HAS_TAIL_MARKINGS)) + var/tail_marking = m_styles["tail"] tail_marking_style = marking_styles_list[tail_marking] tail_marking_icon = new/icon("icon" = tail_marking_style.icon, "icon_state" = "[tail_marking_style.icon_state]_s") - tail_marking_icon.Blend(rgb(hex2num(copytext(marking_colours["tail"], 2, 4)), hex2num(copytext(marking_colours["tail"], 4, 6)), hex2num(copytext(marking_colours["tail"], 6, 8))), ICON_ADD) + tail_marking_icon.Blend(m_colours["tail"], ICON_ADD) if(body_accessory) if(body_accessory.try_restrictions(src)) @@ -1217,16 +1208,13 @@ var/global/list/damage_icon_parts = list() If the species' tail is overlapped by limbs, this will be only the N direction icon so tails can still appear on the outside of uniforms and such. Otherwise, since the user's tail isn't overlapped by limbs, it will be a full icon with all directions. */ - var/list/marking_styles = params2list(m_styles) var/icon/tail_marking_icon var/datum/sprite_accessory/body_markings/tail/tail_marking_style - if(marking_styles["tail"] != "None" && (species.bodyflags & HAS_TAIL_MARKINGS)) - var/tail_marking = marking_styles["tail"] - var/list/marking_colours = params2list(m_colours) - marking_colours["tail"] = sanitize_hexcolor(marking_colours["tail"]) + if(m_styles["tail"] != "None" && (species.bodyflags & HAS_TAIL_MARKINGS)) + var/tail_marking = m_styles["tail"] tail_marking_style = marking_styles_list[tail_marking] tail_marking_icon = new/icon("icon" = tail_marking_style.icon, "icon_state" = "[tail_marking_style.icon_state]w_s") - tail_marking_icon.Blend(rgb(hex2num(copytext(marking_colours["tail"], 2, 4)), hex2num(copytext(marking_colours["tail"], 4, 6)), hex2num(copytext(marking_colours["tail"], 6, 8))), ICON_ADD) + tail_marking_icon.Blend(m_colours["tail"], ICON_ADD) if(body_accessory) var/icon/accessory_s = new/icon("icon" = body_accessory.get_animated_icon(), "icon_state" = body_accessory.get_animated_icon_state()) diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 4c55cc9ba71..c72db051191 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -1,6 +1,10 @@ /datum/preferences //The mob should have a gender you want before running this proc. Will run fine without H /datum/preferences/proc/random_character(gender_override) + var/datum/robolimb/robohead + if(species == "Machine") + var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]" + robohead = all_robolimbs[head_model] if(gender_override) gender = gender_override else @@ -8,18 +12,39 @@ underwear = random_underwear(gender, species) undershirt = random_undershirt(gender, species) socks = random_socks(gender, species) - if(species in list("Human", "Drask")) - s_tone = random_skin_tone() - h_style = random_hair_style(gender, species) - f_style = random_facial_hair_style(gender, species) - if(species == "Human" || species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Machine" || species == "Vulpkanin") + if(species == "Vulpkanin") + body_accessory = random_body_accessory(species) + if(body_accessory == "None") //Required to prevent a bug where the information/icons in the character preferences screen wouldn't update despite the data being changed. + body_accessory = null + if(species in list("Human", "Drask", "Vox")) + s_tone = random_skin_tone(species) + h_style = random_hair_style(gender, species, robohead) + f_style = random_facial_hair_style(gender, species, robohead) + if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) randomize_hair_color("hair") - randomize_hair_color("facial") - randomize_eyes_color() - if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Vulpkanin") + randomize_hair_color("facial") + if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) + ha_style = random_head_accessory(species) + var/list/colours = randomize_skin_color(1) + r_headacc = colours["red"] + g_headacc = colours["green"] + b_headacc = colours["blue"] + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) + m_styles["head"] = random_marking_style("head", species, robohead, body_accessory, alt_head) + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox")) + m_styles["body"] = random_marking_style("body", species, robohead, body_accessory, alt_head) + var/list/colours + for(var/location in list("head", "body", "tail")) + colours = randomize_skin_color(1) + m_colours[location] = rgb(colours["red"], colours["green"], colours["blue"]) + if(species in list("Vox", "Vulpkanin")) //Species with tail markings. + m_styles["tail"] = random_marking_style("tail", species, robohead, body_accessory, alt_head) + if(species != "Machine") + randomize_eyes_color() + if(species in list("Unathi", "Tajaran", "Skrell", "Vulpkanin")) randomize_skin_color() backbag = 2 - age = rand(AGE_MIN,AGE_MAX) + age = rand(AGE_MIN, AGE_MAX) /datum/preferences/proc/randomize_hair_color(var/target = "hair") @@ -130,7 +155,7 @@ g_eyes = green b_eyes = blue -/datum/preferences/proc/randomize_skin_color() +/datum/preferences/proc/randomize_skin_color(var/pass_to_list) var/red var/green var/blue @@ -174,9 +199,17 @@ green = max(min(green + rand (-25, 25), 255), 0) blue = max(min(blue + rand (-25, 25), 255), 0) - r_skin = red - g_skin = green - b_skin = blue + if(pass_to_list) + var/list/colours = list( + "red" = red, + "blue" = blue, + "green" = green + ) + return colours + else + r_skin = red + g_skin = green + b_skin = blue /datum/preferences/proc/blend_backpack(var/icon/clothes_s,var/backbag,var/satchel,var/backpack="backpack") switch(backbag) @@ -273,37 +306,30 @@ temp.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD) if(current_species && (current_species.bodyflags & HAS_TAIL_MARKINGS)) - var/list/marking_styles = params2list(m_styles) - var/list/marking_colours = params2list(m_colours) - var/tail_marking = marking_styles["tail"] + var/tail_marking = m_styles["tail"] var/datum/sprite_accessory/tail_marking_style = marking_styles_list[tail_marking] if(tail_marking_style && tail_marking_style.species_allowed) - marking_colours["tail"] = sanitize_hexcolor(marking_colours["tail"]) var/icon/t_marking_s = new/icon("icon" = tail_marking_style.icon, "icon_state" = "[tail_marking_style.icon_state]_s") - t_marking_s.Blend(rgb(hex2num(copytext(marking_colours["tail"], 2, 4)), hex2num(copytext(marking_colours["tail"], 4, 6)), hex2num(copytext(marking_colours["tail"], 6, 8))), ICON_ADD) + t_marking_s.Blend(m_colours["tail"], ICON_ADD) temp.Blend(t_marking_s, ICON_OVERLAY) preview_icon.Blend(temp, ICON_OVERLAY) //Markings if(current_species && ((current_species.bodyflags & HAS_HEAD_MARKINGS) || (current_species.bodyflags & HAS_BODY_MARKINGS))) - var/list/marking_styles = params2list(m_styles) - var/list/marking_colours = params2list(m_colours) if(current_species.bodyflags & HAS_BODY_MARKINGS) //Body markings. - var/body_marking = marking_styles["body"] + var/body_marking = m_styles["body"] var/datum/sprite_accessory/body_marking_style = marking_styles_list[body_marking] if(body_marking_style && body_marking_style.species_allowed) - marking_colours["body"] = sanitize_hexcolor(marking_colours["body"]) var/icon/b_marking_s = new/icon("icon" = body_marking_style.icon, "icon_state" = "[body_marking_style.icon_state]_s") - b_marking_s.Blend(rgb(hex2num(copytext(marking_colours["body"], 2, 4)), hex2num(copytext(marking_colours["body"], 4, 6)), hex2num(copytext(marking_colours["body"], 6, 8))), ICON_ADD) + b_marking_s.Blend(m_colours["body"], ICON_ADD) preview_icon.Blend(b_marking_s, ICON_OVERLAY) if(current_species.bodyflags & HAS_HEAD_MARKINGS) //Head markings. - var/head_marking = marking_styles["head"] + var/head_marking = m_styles["head"] var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking] if(head_marking_style && head_marking_style.species_allowed) - marking_colours["head"] = sanitize_hexcolor(marking_colours["head"]) var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s") - h_marking_s.Blend(rgb(hex2num(copytext(marking_colours["head"], 2, 4)), hex2num(copytext(marking_colours["head"], 4, 6)), hex2num(copytext(marking_colours["head"], 6, 8))), ICON_ADD) + h_marking_s.Blend(m_colours["head"], ICON_ADD) preview_icon.Blend(h_marking_s, ICON_OVERLAY) diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index 958cfa351f2..3a8dcb74216 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -68,7 +68,6 @@ bald name = "Bald" icon_state = "bald" - gender = MALE species_allowed = list("Human", "Unathi", "Vox", "Diona", "Kidan", "Grey", "Plasmaman", "Skeleton", "Vulpkanin", "Tajaran") short diff --git a/code/modules/nano/modules/human_appearance.dm b/code/modules/nano/modules/human_appearance.dm index 7771764c5a1..3487b45da96 100644 --- a/code/modules/nano/modules/human_appearance.dm +++ b/code/modules/nano/modules/human_appearance.dm @@ -67,9 +67,9 @@ if(can_change_skin_color()) var/new_skin = input(usr, "Choose your character's skin colour: ", "Skin Color", rgb(owner.r_skin, owner.g_skin, owner.b_skin)) as color|null if(new_skin && can_still_topic(state)) - var/r_skin = hex2num(copytext(new_skin, 2, 4)) - var/g_skin = hex2num(copytext(new_skin, 4, 6)) - var/b_skin = hex2num(copytext(new_skin, 6, 8)) + var/r_skin = color2R(new_skin) + var/g_skin = color2G(new_skin) + var/b_skin = color2B(new_skin) if(owner.change_skin_color(r_skin, g_skin, b_skin)) update_dna() return 1 @@ -82,9 +82,9 @@ if(can_change(APPEARANCE_HAIR_COLOR)) var/new_hair = input("Please select hair color.", "Hair Color", rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair)) as color|null if(new_hair && can_still_topic(state)) - var/r_hair = hex2num(copytext(new_hair, 2, 4)) - var/g_hair = hex2num(copytext(new_hair, 4, 6)) - var/b_hair = hex2num(copytext(new_hair, 6, 8)) + var/r_hair = color2R(new_hair) + var/g_hair = color2G(new_hair) + var/b_hair = color2B(new_hair) if(owner.change_hair_color(r_hair, g_hair, b_hair)) update_dna() return 1 @@ -92,9 +92,9 @@ if(can_change(APPEARANCE_SECONDARY_HAIR_COLOR)) var/new_hair = input("Please select secondary hair color.", "Secondary Hair Color", rgb(head_organ.r_hair_sec, head_organ.g_hair_sec, head_organ.b_hair_sec)) as color|null if(new_hair && can_still_topic(state)) - var/r_hair_sec = hex2num(copytext(new_hair, 2, 4)) - var/g_hair_sec = hex2num(copytext(new_hair, 4, 6)) - var/b_hair_sec = hex2num(copytext(new_hair, 6, 8)) + var/r_hair_sec = color2R(new_hair) + var/g_hair_sec = color2G(new_hair) + var/b_hair_sec = color2B(new_hair) if(owner.change_hair_color(r_hair_sec, g_hair_sec, b_hair_sec, 1)) update_dna() return 1 @@ -107,9 +107,9 @@ if(can_change(APPEARANCE_FACIAL_HAIR_COLOR)) var/new_facial = input("Please select facial hair color.", "Facial Hair Color", rgb(head_organ.r_facial, head_organ.g_facial, head_organ.b_facial)) as color|null if(new_facial && can_still_topic(state)) - var/r_facial = hex2num(copytext(new_facial, 2, 4)) - var/g_facial = hex2num(copytext(new_facial, 4, 6)) - var/b_facial = hex2num(copytext(new_facial, 6, 8)) + var/r_facial = color2R(new_facial) + var/g_facial = color2G(new_facial) + var/b_facial = color2B(new_facial) if(owner.change_facial_hair_color(r_facial, g_facial, b_facial)) update_dna() return 1 @@ -117,9 +117,9 @@ if(can_change(APPEARANCE_SECONDARY_FACIAL_HAIR_COLOR)) var/new_facial = input("Please select secondary facial hair color.", "Secondary Facial Hair Color", rgb(head_organ.r_facial_sec, head_organ.g_facial_sec, head_organ.b_facial_sec)) as color|null if(new_facial && can_still_topic(state)) - var/r_facial_sec = hex2num(copytext(new_facial, 2, 4)) - var/g_facial_sec = hex2num(copytext(new_facial, 4, 6)) - var/b_facial_sec = hex2num(copytext(new_facial, 6, 8)) + var/r_facial_sec = color2R(new_facial) + var/g_facial_sec = color2G(new_facial) + var/b_facial_sec = color2B(new_facial) if(owner.change_facial_hair_color(r_facial_sec, g_facial_sec, b_facial_sec, 1)) update_dna() return 1 @@ -127,9 +127,9 @@ if(can_change(APPEARANCE_EYE_COLOR)) var/new_eyes = input("Please select eye color.", "Eye Color", rgb(owner.r_eyes, owner.g_eyes, owner.b_eyes)) as color|null if(new_eyes && can_still_topic(state)) - var/r_eyes = hex2num(copytext(new_eyes, 2, 4)) - var/g_eyes = hex2num(copytext(new_eyes, 4, 6)) - var/b_eyes = hex2num(copytext(new_eyes, 6, 8)) + var/r_eyes = color2R(new_eyes) + var/g_eyes = color2G(new_eyes) + var/b_eyes = color2B(new_eyes) if(owner.change_eye_color(r_eyes, g_eyes, b_eyes)) update_dna() return 1 @@ -142,9 +142,9 @@ if(can_change_head_accessory()) var/new_head_accessory = input("Please select head accessory color.", "Head Accessory Color", rgb(head_organ.r_headacc, head_organ.g_headacc, head_organ.b_headacc)) as color|null if(new_head_accessory && can_still_topic(state)) - var/r_headacc = hex2num(copytext(new_head_accessory, 2, 4)) - var/g_headacc = hex2num(copytext(new_head_accessory, 4, 6)) - var/b_headacc = hex2num(copytext(new_head_accessory, 6, 8)) + var/r_headacc = color2R(new_head_accessory) + var/g_headacc = color2G(new_head_accessory) + var/b_headacc = color2B(new_head_accessory) if(owner.change_head_accessory_color(r_headacc, g_headacc, b_headacc)) update_dna() return 1 @@ -155,9 +155,7 @@ return 1 if(href_list["head_marking_color"]) if(can_change_markings("head")) - var/list/marking_colours = params2list(owner.m_colours) - marking_colours["head"] = sanitize_hexcolor(marking_colours["head"]) - var/new_markings = input("Please select head marking color.", "Marking Color", rgb(hex2num(copytext(marking_colours["head"], 2, 4)), hex2num(copytext(marking_colours["head"], 4, 6)), hex2num(copytext(marking_colours["head"], 6, 8)))) as color|null + var/new_markings = input("Please select head marking color.", "Marking Color", owner.m_colours["head"]) as color|null if(new_markings && can_still_topic(state)) if(owner.change_marking_color(new_markings, "head")) update_dna() @@ -169,9 +167,7 @@ return 1 if(href_list["body_marking_color"]) if(can_change_markings("body")) - var/list/marking_colours = params2list(owner.m_colours) - marking_colours["body"] = sanitize_hexcolor(marking_colours["body"]) - var/new_markings = input("Please select body marking color.", "Marking Color", rgb(hex2num(copytext(marking_colours["body"], 2, 4)), hex2num(copytext(marking_colours["body"], 4, 6)), hex2num(copytext(marking_colours["body"], 6, 8)))) as color|null + var/new_markings = input("Please select body marking color.", "Marking Color", owner.m_colours["body"]) as color|null if(new_markings && can_still_topic(state)) if(owner.change_marking_color(new_markings, "body")) update_dna() @@ -183,9 +179,7 @@ return 1 if(href_list["tail_marking_color"]) if(can_change_markings("tail")) - var/list/marking_colours = params2list(owner.m_colours) - marking_colours["tail"] = sanitize_hexcolor(marking_colours["tail"]) - var/new_markings = input("Please select tail marking color.", "Marking Color", rgb(hex2num(copytext(marking_colours["tail"], 2, 4)), hex2num(copytext(marking_colours["tail"], 4, 6)), hex2num(copytext(marking_colours["tail"], 6, 8)))) as color|null + var/new_markings = input("Please select tail marking color.", "Marking Color", owner.m_colours["tail"]) as color|null if(new_markings && can_still_topic(state)) if(owner.change_marking_color(new_markings, "tail")) update_dna() @@ -246,8 +240,7 @@ data["change_head_markings"] = can_change_markings("head") if(data["change_head_markings"]) - var/list/marking_styles = params2list(owner.m_styles) - var/m_style = marking_styles["head"] + var/m_style = owner.m_styles["head"] var/head_marking_styles[0] for(var/head_marking_style in valid_head_marking_styles) head_marking_styles[++head_marking_styles.len] = list("headmarkingstyle" = head_marking_style) @@ -256,8 +249,7 @@ data["change_body_markings"] = can_change_markings("body") if(data["change_body_markings"]) - var/list/marking_styles = params2list(owner.m_styles) - var/m_style = marking_styles["body"] + var/m_style = owner.m_styles["body"] var/body_marking_styles[0] for(var/body_marking_style in valid_body_marking_styles) body_marking_styles[++body_marking_styles.len] = list("bodymarkingstyle" = body_marking_style) @@ -266,8 +258,7 @@ data["change_tail_markings"] = can_change_markings("tail") if(data["change_tail_markings"]) - var/list/marking_styles = params2list(owner.m_styles) - var/m_style = marking_styles["tail"] + var/m_style = owner.m_styles["tail"] var/tail_marking_styles[0] for(var/tail_marking_style in valid_tail_marking_styles) tail_marking_styles[++tail_marking_styles.len] = list("tailmarkingstyle" = tail_marking_style) diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index 0de37b1a652..74121e1537d 100644 --- a/code/modules/surgery/limb_reattach.dm +++ b/code/modules/surgery/limb_reattach.dm @@ -104,11 +104,9 @@ var/obj/item/organ/external/head/H = target.get_organ("head") var/datum/robolimb/robohead = all_robolimbs[H.model] if(robohead.is_monitor) //Ensures that if an IPC gets a head that's got a human hair wig attached to their body, the hair won't wipe. - var/list/marking_styles = params2list(target.m_styles) - H.h_style = "" - H.f_style = "" - marking_styles["head"] = "None" - target.m_styles = list2params(marking_styles) + H.h_style = "Bald" + H.f_style = "Shaved" + target.m_styles["head"] = "None" E.status &= ~ORGAN_DESTROYED if(E.children) for(var/obj/item/organ/external/C in E.children) diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index 2f0eb84c1be..5e2521ca4c8 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -73,16 +73,13 @@ var/global/list/limb_icon_cache = list() overlays |= lip_icon mob_icon.Blend(lip_icon, ICON_OVERLAY) - var/list/marking_styles = params2list(owner.m_styles) - var/head_marking = marking_styles["head"] + var/head_marking = owner.m_styles["head"] if(head_marking != "None") - var/list/marking_colours = params2list(owner.m_colours) - marking_colours["head"] = sanitize_hexcolor(marking_colours["head"]) var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking] if(head_marking_style && head_marking_style.species_allowed && (species.name in head_marking_style.species_allowed) && head_marking_style.marking_location == "head") var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s") if(head_marking_style.do_colouration) - h_marking_s.Blend(rgb(hex2num(copytext(marking_colours["head"], 2, 4)), hex2num(copytext(marking_colours["head"], 4, 6)), hex2num(copytext(marking_colours["head"], 6, 8))), ICON_ADD) + h_marking_s.Blend(owner.m_colours["head"], ICON_ADD) overlays |= h_marking_s if(H.ha_style) diff --git a/icons/mob/eyes.dmi b/icons/mob/eyes.dmi index 402bf49bd5c4d2729d5240912d902376c67e7143..c9441eb6d56cb84f6336979f36f59048020ba142 100644 GIT binary patch delta 6942 zcmZ{p30zX?*T*SmYNkx1GA$Pxt!z=rOw9#ov7EBB#WGh+Q%qA*a$jyUrBSAinYrVr zskwj)DXvhOnHy%gky~mm0pbd%2=~48Uq1i$^M7AHAGq9y=fZQ(InO!Y-$CH;-Juk> zWw%UTPO2FDvin^4-^^c~-`un204cS-{6CB}6MT1A0S2S6O2QOVEAFhNdHvFJ93ti} z!s;4I@Y4mWv{ezcr^p7^gYX)q@cA}xyPUJPw|AuJZX-wjg1YI@>144?jOSGV z5G2aebxBqH8QnSnFr`l}R0&t}lI3nXXB+T^xB^^h0RvMD4F!dDOh8k>=b0kg3Lj^{ zc;(|G^bYLmrzFpz4SyxHMq4g6DK_`V9X2**FCaC8cbmiw4-Y%wN<;YU;_G@PgMAHI zc^}*}x7XL#M+#A*M6I-NOW9cvQ3m~h*YoBRZad-d$kWKP2BP#EUGuo=5ut*rYGlb8 z`)%>v=_VqvYpcPvDRl1o{$5)Y>nrf}!^C8XL7W=?_U!^&3>>bv(`hRlzEN^3V9>wM zalT!z^FoOBsL!q89xCPcYLIMCbB`{m&kLK}g?m4RUSy47?*YX>&Kl*>)((|-Yh56r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