diff --git a/SQL/paradise_schema.sql b/SQL/paradise_schema.sql index 5cc19d0848e..ec34b6632f3 100644 --- a/SQL/paradise_schema.sql +++ b/SQL/paradise_schema.sql @@ -33,28 +33,23 @@ CREATE TABLE `characters` ( `hair_red` smallint(4) NOT NULL, `hair_green` smallint(4) NOT NULL, `hair_blue` smallint(4) NOT NULL, - `secondary_hair_red` smallint(4) NOT NULL, - `secondary_hair_green` smallint(4) NOT NULL, - `secondary_hair_blue` smallint(4) NOT NULL, `facial_red` smallint(4) NOT NULL, `facial_green` smallint(4) NOT NULL, `facial_blue` smallint(4) NOT NULL, - `secondary_facial_red` smallint(4) NOT NULL, - `secondary_facial_green` smallint(4) NOT NULL, - `secondary_facial_blue` smallint(4) NOT NULL, `skin_tone` smallint(4) NOT NULL, `skin_red` smallint(4) NOT NULL, `skin_green` smallint(4) NOT NULL, `skin_blue` smallint(4) NOT NULL, - `marking_colours` mediumtext NOT NULL DEFAULT 'head=%23000000&body=%23000000&tail=%23000000', + `markings_red` smallint(4) NOT NULL, + `markings_green` smallint(4) NOT NULL, + `markings_blue` smallint(4) NOT NULL, `head_accessory_red` smallint(4) NOT NULL, `head_accessory_green` smallint(4) NOT NULL, `head_accessory_blue` smallint(4) NOT NULL, `hair_style_name` varchar(45) NOT NULL, `facial_style_name` varchar(45) NOT NULL, - `marking_styles` mediumtext NOT NULL DEFAULT 'head=None&body=None&tail=None', + `marking_style_name` varchar(45) NOT NULL, `head_accessory_style_name` varchar(45) NOT NULL, - `alt_head_name` varchar(45) NOT NULL, `eyes_red` smallint(4) NOT NULL, `eyes_green` smallint(4) NOT NULL, `eyes_blue` smallint(4) NOT NULL, diff --git a/SQL/paradise_schema_prefixed.sql b/SQL/paradise_schema_prefixed.sql index d93eb4ef681..b5115a93caf 100644 --- a/SQL/paradise_schema_prefixed.sql +++ b/SQL/paradise_schema_prefixed.sql @@ -33,28 +33,23 @@ CREATE TABLE `SS13_characters` ( `hair_red` smallint(4) NOT NULL, `hair_green` smallint(4) NOT NULL, `hair_blue` smallint(4) NOT NULL, - `secondary_hair_red` smallint(4) NOT NULL, - `secondary_hair_green` smallint(4) NOT NULL, - `secondary_hair_blue` smallint(4) NOT NULL, `facial_red` smallint(4) NOT NULL, `facial_green` smallint(4) NOT NULL, `facial_blue` smallint(4) NOT NULL, - `secondary_facial_red` smallint(4) NOT NULL, - `secondary_facial_green` smallint(4) NOT NULL, - `secondary_facial_blue` smallint(4) NOT NULL, `skin_tone` smallint(4) NOT NULL, `skin_red` smallint(4) NOT NULL, `skin_green` smallint(4) NOT NULL, `skin_blue` smallint(4) NOT NULL, - `marking_colours` mediumtext NOT NULL DEFAULT 'head=%23000000&body=%23000000&tail=%23000000', + `markings_red` smallint(4) NOT NULL, + `markings_green` smallint(4) NOT NULL, + `markings_blue` smallint(4) NOT NULL, `head_accessory_red` smallint(4) NOT NULL, `head_accessory_green` smallint(4) NOT NULL, `head_accessory_blue` smallint(4) NOT NULL, `hair_style_name` varchar(45) NOT NULL, `facial_style_name` varchar(45) NOT NULL, - `marking_styles` mediumtext NOT NULL DEFAULT 'head=None&body=None&tail=None', + `marking_style_name` varchar(45) NOT NULL, `head_accessory_style_name` varchar(45) NOT NULL, - `alt_head_name` varchar(45) NOT NULL, `eyes_red` smallint(4) NOT NULL, `eyes_green` smallint(4) NOT NULL, `eyes_blue` smallint(4) NOT NULL, diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index e7966690a8e..2b2adbdbaf2 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -59,13 +59,10 @@ #define HAS_SKIN_TONE 64 #define HAS_ICON_SKIN_TONE 128 #define HAS_SKIN_COLOR 256 -#define HAS_HEAD_MARKINGS 512 -#define HAS_BODY_MARKINGS 1024 -#define HAS_TAIL_MARKINGS 2048 -#define TAIL_WAGGING 4096 -#define NO_EYES 8192 -#define HAS_FUR 16384 -#define HAS_ALT_HEADS 32768 +#define HAS_MARKINGS 512 +#define TAIL_WAGGING 1024 +#define NO_EYES 2048 +#define HAS_FUR 4096 //Species Diet Flags #define DIET_CARN 1 diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index d7cd7ad7401..cbd39a49a21 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -214,14 +214,14 @@ #define GLOVES_LAYER 11 #define EARS_LAYER 12 #define SUIT_LAYER 13 -#define BELT_LAYER 14 //Possible make this an overlay of somethign required to wear a belt? -#define SUIT_STORE_LAYER 15 -#define BACK_LAYER 16 -#define FHAIR_LAYER 17 -#define HAIR_LAYER 18 //TODO: make part of head layer? -#define HEAD_ACCESSORY_LAYER 19 -#define GLASSES_LAYER 20 -#define TAIL_LAYER 21 //bs12 specific. this hack is probably gonna come back to haunt me +#define GLASSES_LAYER 14 +#define BELT_LAYER 15 //Possible make this an overlay of somethign required to wear a belt? +#define SUIT_STORE_LAYER 16 +#define BACK_LAYER 17 +#define TAIL_LAYER 18 //bs12 specific. this hack is probably gonna come back to haunt me +#define HAIR_LAYER 19 //TODO: make part of head layer? +#define HEAD_ACCESSORY_LAYER 20 +#define FHAIR_LAYER 21 #define FACEMASK_LAYER 22 #define HEAD_LAYER 23 #define COLLAR_LAYER 24 diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm index 5d9aba0e3df..736ca0d291f 100644 --- a/code/__DEFINES/mob.dm +++ b/code/__DEFINES/mob.dm @@ -72,18 +72,15 @@ #define APPEARANCE_SKIN 8 #define APPEARANCE_HAIR 16 #define APPEARANCE_HAIR_COLOR 32 -#define APPEARANCE_SECONDARY_HAIR_COLOR 64 -#define APPEARANCE_FACIAL_HAIR 128 -#define APPEARANCE_FACIAL_HAIR_COLOR 256 -#define APPEARANCE_SECONDARY_FACIAL_HAIR_COLOR 512 -#define APPEARANCE_EYE_COLOR 1024 -#define APPEARANCE_ALL_HAIR APPEARANCE_HAIR|APPEARANCE_HAIR_COLOR|APPEARANCE_SECONDARY_HAIR_COLOR|APPEARANCE_FACIAL_HAIR|APPEARANCE_FACIAL_HAIR_COLOR|APPEARANCE_SECONDARY_FACIAL_HAIR_COLOR -#define APPEARANCE_HEAD_ACCESSORY 2048 -#define APPEARANCE_MARKINGS 4096 -#define APPEARANCE_BODY_ACCESSORY 8192 -#define APPEARANCE_ALT_HEAD 16384 -#define APPEARANCE_ALL_BODY APPEARANCE_ALL_HAIR|APPEARANCE_HEAD_ACCESSORY|APPEARANCE_MARKINGS|APPEARANCE_BODY_ACCESSORY|APPEARANCE_ALT_HEAD -#define APPEARANCE_ALL 32767 +#define APPEARANCE_FACIAL_HAIR 64 +#define APPEARANCE_FACIAL_HAIR_COLOR 128 +#define APPEARANCE_EYE_COLOR 256 +#define APPEARANCE_ALL_HAIR APPEARANCE_HAIR|APPEARANCE_HAIR_COLOR|APPEARANCE_FACIAL_HAIR|APPEARANCE_FACIAL_HAIR_COLOR +#define APPEARANCE_HEAD_ACCESSORY 512 +#define APPEARANCE_MARKINGS 1024 +#define APPEARANCE_BODY_ACCESSORY 2048 +#define APPEARANCE_ALL_BODY APPEARANCE_ALL_HAIR|APPEARANCE_HEAD_ACCESSORY|APPEARANCE_MARKINGS|APPEARANCE_BODY_ACCESSORY +#define APPEARANCE_ALL 4095 // Intents #define I_HELP "help" diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index ed0b7887e5a..7398518bb03 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -18,8 +18,6 @@ init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, undershirt_list, undershirt_m, undershirt_f) //socks init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, socks_list, socks_m, socks_f) - //alt heads - init_sprite_accessory_subtypes(/datum/sprite_accessory/alt_heads, alt_heads_list) init_subtypes(/datum/surgery_step, surgery_steps) diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index 77d404a741a..d409d6e54c9 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -3,9 +3,6 @@ var/global/list/head_accessory_styles_list = list() //stores /datum/sprite_accessory/head_accessory indexed by name //Marking styles var/global/list/marking_styles_list = list() //stores /datum/sprite_accessory/body_markings indexed by name -var/global/list/head_marking_styles_list = list() -var/global/list/body_marking_styles_list = list() -var/global/list/tail_marking_styles_list = list() //Hairstyles var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name var/global/list/hair_styles_male_list = list() @@ -26,8 +23,6 @@ var/global/list/undershirt_f = list() //stores only undershirt name var/global/list/socks_list = list() //stores /datum/sprite_accessory/socks indexed by name var/global/list/socks_m = list() //stores only socks name var/global/list/socks_f = list() //stores only socks name - //Alt Heads -var/global/list/alt_heads_list = list() //stores /datum/sprite_accessory/alt_heads indexed by name //Backpacks var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt") diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index ea1a82fc6fd..f9c3ce39b08 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -140,12 +140,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H) var/icon/temp temp = new /icon(icobase, "groin_[g]") preview_icon.Blend(temp, ICON_OVERLAY) - var/head = "head" - if(head_organ.alt_head && head_organ.species.bodyflags & HAS_ALT_HEADS) - var/datum/sprite_accessory/alt_heads/alternate_head = alt_heads_list[head_organ.alt_head] - if(alternate_head.icon_state) - head = alternate_head.icon_state - temp = new /icon(icobase, "[head]_[g]") + temp = new /icon(icobase, "head_[g]") preview_icon.Blend(temp, ICON_OVERLAY) //Tail @@ -187,13 +182,6 @@ proc/get_id_photo(var/mob/living/carbon/human/H) hair_s.Blend(rgb(H.r_skin, H.g_skin, H.b_skin, 160), ICON_ADD) else hair_s.Blend(rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair), ICON_ADD) - - if(hair_style.secondary_theme) - var/icon/hair_secondary_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_[hair_style.secondary_theme]_s") - if(!hair_style.no_sec_colour) - hair_secondary_s.Blend(rgb(head_organ.r_hair_sec, head_organ.g_hair_sec, head_organ.b_hair_sec), ICON_ADD) - hair_s.Blend(hair_secondary_s, ICON_OVERLAY) - face_s.Blend(hair_s, ICON_OVERLAY) //Head Accessory @@ -211,33 +199,15 @@ proc/get_id_photo(var/mob/living/carbon/human/H) facial_s.Blend(rgb(H.r_skin, H.g_skin, H.b_skin, 160), ICON_ADD) else facial_s.Blend(rgb(head_organ.r_facial, head_organ.g_facial, head_organ.b_facial), ICON_ADD) - - if(facial_hair_style.secondary_theme) - var/icon/facial_secondary_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_[facial_hair_style.secondary_theme]_s") - if(!facial_hair_style.no_sec_colour) - facial_secondary_s.Blend(rgb(head_organ.r_facial_sec, head_organ.g_facial_sec, head_organ.b_facial_sec), ICON_ADD) - facial_s.Blend(facial_secondary_s, ICON_OVERLAY) - face_s.Blend(facial_s, ICON_OVERLAY) //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/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) - face_s.Blend(b_marking_s, ICON_OVERLAY) - if(H.species.bodyflags & HAS_HEAD_MARKINGS) //Head markings. - var/head_marking = marking_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) - face_s.Blend(h_marking_s, ICON_OVERLAY) + if(H.species.bodyflags & HAS_MARKINGS) + var/datum/sprite_accessory/marking_style = marking_styles_list[H.m_style] + if(marking_style && marking_style.species_allowed) + var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s") + markings_s.Blend(rgb(H.r_markings, H.g_markings, H.b_markings), ICON_ADD) + face_s.Blend(markings_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..4224ad1aa5e 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -30,27 +30,19 @@ #define DNA_UI_HACC_R 11 #define DNA_UI_HACC_G 12 #define DNA_UI_HACC_B 13 -#define DNA_UI_HEAD_MARK_R 14 -#define DNA_UI_HEAD_MARK_G 15 -#define DNA_UI_HEAD_MARK_B 16 -#define DNA_UI_BODY_MARK_R 17 -#define DNA_UI_BODY_MARK_G 18 -#define DNA_UI_BODY_MARK_B 19 -#define DNA_UI_TAIL_MARK_R 20 -#define DNA_UI_TAIL_MARK_G 21 -#define DNA_UI_TAIL_MARK_B 22 -#define DNA_UI_EYES_R 23 -#define DNA_UI_EYES_G 24 -#define DNA_UI_EYES_B 25 -#define DNA_UI_GENDER 26 -#define DNA_UI_BEARD_STYLE 27 -#define DNA_UI_HAIR_STYLE 28 +#define DNA_UI_MARK_R 14 +#define DNA_UI_MARK_G 15 +#define DNA_UI_MARK_B 16 +#define DNA_UI_EYES_R 17 +#define DNA_UI_EYES_G 18 +#define DNA_UI_EYES_B 19 +#define DNA_UI_GENDER 20 +#define DNA_UI_BEARD_STYLE 21 +#define DNA_UI_HAIR_STYLE 22 /*#define DNA_UI_BACC_STYLE 23*/ -#define DNA_UI_HACC_STYLE 29 -#define DNA_UI_HEAD_MARK_STYLE 30 -#define DNA_UI_BODY_MARK_STYLE 31 -#define DNA_UI_TAIL_MARK_STYLE 32 -#define DNA_UI_LENGTH 32 // Update this when you add something, or you WILL break shit. +#define DNA_UI_HACC_STYLE 23 +#define DNA_UI_MARK_STYLE 24 +#define DNA_UI_LENGTH 24 // Update this when you add something, or you WILL break shit. #define DNA_SE_LENGTH 55 // Was STRUCDNASIZE, size 27. 15 new blocks added = 42, plus room to grow. @@ -162,16 +154,9 @@ var/global/list/bad_blocks[0] var/bodyacc = character.body_accessory*/ // Markings - if(!character.m_styles) - character.m_styles = "head=None;\ - body=None;\ - tail=None" - - 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"]) + if(!character.m_style) + character.m_style = "None" + var/marks = marking_styles_list.Find(character.m_style) SetUIValueRange(DNA_UI_HAIR_R, H.r_hair, 255, 1) SetUIValueRange(DNA_UI_HAIR_G, H.g_hair, 255, 1) @@ -193,17 +178,9 @@ 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_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_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_MARK_R, character.r_markings, 255, 1) + SetUIValueRange(DNA_UI_MARK_G, character.g_markings, 255, 1) + SetUIValueRange(DNA_UI_MARK_B, character.b_markings, 255, 1) SetUIValueRange(DNA_UI_SKIN_TONE, 35-character.s_tone, 220, 1) // Value can be negative. @@ -213,9 +190,7 @@ var/global/list/bad_blocks[0] SetUIValueRange(DNA_UI_BEARD_STYLE, beard, facial_hair_styles_list.len, 1) /*SetUIValueRange(DNA_UI_BACC_STYLE, bodyacc, facial_hair_styles_list.len, 1)*/ SetUIValueRange(DNA_UI_HACC_STYLE, headacc, head_accessory_styles_list.len, 1) - SetUIValueRange(DNA_UI_HEAD_MARK_STYLE, head_marks, marking_styles_list.len, 1) - SetUIValueRange(DNA_UI_BODY_MARK_STYLE, body_marks, marking_styles_list.len, 1) - SetUIValueRange(DNA_UI_TAIL_MARK_STYLE, tail_marks, marking_styles_list.len, 1) + SetUIValueRange(DNA_UI_MARK_STYLE, marks, marking_styles_list.len, 1) UpdateUI() diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 9b0bd39dc9a..5bc984b11ac 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -152,10 +152,10 @@ 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.r_markings = dna.GetUIValueRange(DNA_UI_MARK_R, 255) + H.g_markings = dna.GetUIValueRange(DNA_UI_MARK_G, 255) + H.b_markings = dna.GetUIValueRange(DNA_UI_MARK_B, 255) + H.update_eyes() @@ -181,43 +181,16 @@ if((0 < headacc) && (headacc <= head_accessory_styles_list.len)) head_organ.ha_style = head_accessory_styles_list[headacc] - var/number_head_marks = 0 - var/number_body_marks = 0 - var/number_tail_marks = 0 - for(var/m in marking_styles_list) - var/datum/sprite_accessory/body_markings/marking = marking_styles_list[m] - if(marking.marking_location == "head") - number_head_marks++ - else if(marking.marking_location == "body") - number_body_marks++ - else if(marking.marking_location == "tail") - 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) - //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) - //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) + //Markings + var/marks = dna.GetUIValueRange(DNA_UI_MARK_STYLE,marking_styles_list.len) + if((0 < marks) && (marks <= marking_styles_list.len)) + H.m_style = marking_styles_list[marks] H.force_update_limbs() H.update_eyes() H.update_hair() H.update_fhair() H.update_markings() - H.update_tail_layer() H.update_head_accessory() return 1 diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm index 0f1c700a17f..7ed7f3fea97 100644 --- a/code/game/dna/genes/vg_powers.dm +++ b/code/game/dna/genes/vg_powers.dm @@ -46,58 +46,63 @@ 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.r_eyes = hex2num(copytext(new_eyes, 2, 4)) + M.g_eyes = hex2num(copytext(new_eyes, 4, 6)) + M.b_eyes = hex2num(copytext(new_eyes, 6, 8)) M.change_eye_color(M.r_eyes, M.g_eyes, M.b_eyes) - //Alt heads. - if(head_organ.species.bodyflags & HAS_ALT_HEADS) - var/list/valid_alt_heads = M.generate_valid_alt_heads() - var/new_alt_head = input("Please select alternate head", "Character Generation", head_organ.alt_head) as null|anything in valid_alt_heads - if(new_alt_head) - M.change_alt_head(new_alt_head) - // hair var/list/valid_hairstyles = M.generate_valid_hairstyles() var/new_style = input("Please select hair style", "Character Generation", head_organ.h_style) as null|anything in valid_hairstyles // if new style selected (not cancel) if(new_style) - M.change_hair(new_style) + head_organ.h_style = new_style 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))) - - 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) + head_organ.r_hair = hex2num(copytext(new_hair, 2, 4)) + head_organ.g_hair = hex2num(copytext(new_hair, 4, 6)) + head_organ.b_hair = hex2num(copytext(new_hair, 6, 8)) // facial hair var/list/valid_facial_hairstyles = M.generate_valid_facial_hairstyles() new_style = input("Please select facial style", "Character Generation", head_organ.f_style) as null|anything in valid_facial_hairstyles if(new_style) - M.change_facial_hair(new_style) + head_organ.f_style = new_style 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))) - - 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) + head_organ.r_facial = hex2num(copytext(new_facial, 2, 4)) + head_organ.g_facial = hex2num(copytext(new_facial, 4, 6)) + head_organ.b_facial = hex2num(copytext(new_facial, 6, 8)) //Head accessory. if(head_organ.species.bodyflags & HAS_HEAD_ACCESSORY) var/list/valid_head_accessories = M.generate_valid_head_accessories() var/new_head_accessory = input("Please select head accessory style", "Character Generation", head_organ.ha_style) as null|anything in valid_head_accessories if(new_head_accessory) - M.change_head_accessory(new_head_accessory) + head_organ.ha_style = new_head_accessory 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))) + head_organ.r_headacc = hex2num(copytext(new_head_accessory_colour, 2, 4)) + head_organ.g_headacc = hex2num(copytext(new_head_accessory_colour, 4, 6)) + head_organ.b_headacc = hex2num(copytext(new_head_accessory_colour, 6, 8)) + + //Body markings. + if(M.species.bodyflags & HAS_MARKINGS) + var/list/valid_markings = M.generate_valid_markings() + var/new_marking = input("Please select marking style", "Character Generation", M.m_style) as null|anything in valid_markings + if(new_marking) + M.m_style = new_marking + + var/new_marking_colour = input("Please select marking colour.", "Character Generation", rgb(M.r_markings, M.g_markings, M.b_markings)) as null|color + if(new_marking_colour) + M.r_markings = hex2num(copytext(new_marking_colour, 2, 4)) + M.g_markings = hex2num(copytext(new_marking_colour, 4, 6)) + M.b_markings = hex2num(copytext(new_marking_colour, 6, 8)) //Body accessory. if(M.species.tail && M.species.bodyflags & HAS_TAIL) @@ -105,60 +110,18 @@ if(valid_body_accessories.len > 1) //By default valid_body_accessories will always have at the very least a 'none' entry populating the list, even if the user's species is not present in any of the list items. var/new_body_accessory = input("Please select body accessory style", "Character Generation", M.body_accessory) as null|anything in valid_body_accessories if(new_body_accessory) - M.change_body_accessory(new_body_accessory) - - //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 - 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 - 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 - 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 - 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 - 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 - if(new_marking_colour) - M.change_marking_color(new_marking_colour, "tail") + M.body_accessory = body_accessory_by_name[new_body_accessory] //Skin tone. if(M.species.bodyflags & HAS_SKIN_TONE) var/new_tone = input("Please select skin tone level: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation", M.s_tone) as null|text if(!new_tone) new_tone = 35 - else - new_tone = 35 - max(min(round(text2num(new_tone)), 220), 1) - M.change_skin_tone(new_tone) + M.s_tone = 35 - max(min(round(text2num(new_tone)), 220), 1) if(M.species.bodyflags & HAS_ICON_SKIN_TONE) var/prompt = "Please select skin tone: 1-[M.species.icon_skin_tones.len] (" - for(var/i = 1 to M.species.icon_skin_tones.len) + for(var/i = 1; i <= M.species.icon_skin_tones.len; i++) prompt += "[i] = [M.species.icon_skin_tones[i]]" if(i != M.species.icon_skin_tones.len) prompt += ", " @@ -167,16 +130,18 @@ var/new_tone = input(prompt, "Character Generation", M.s_tone) as null|text if(!new_tone) new_tone = 0 - else - new_tone = max(min(round(text2num(new_tone)), M.species.icon_skin_tones.len), 1) - M.change_skin_tone(new_tone) + M.s_tone = max(min(round(text2num(new_tone)), M.species.icon_skin_tones.len), 1) //Skin colour. 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.r_skin = hex2num(copytext(new_body_colour, 2, 4)) + M.g_skin = hex2num(copytext(new_body_colour, 4, 6)) + M.b_skin = hex2num(copytext(new_body_colour, 6, 8)) + M.force_update_limbs() + M.regenerate_icons() M.update_dna() M.visible_message("[src] morphs and changes [M.get_visible_gender() == MALE ? "his" : M.get_visible_gender() == FEMALE ? "her" : "their"] appearance!", "You change your appearance!", "Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!") diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 5f0d31f9c26..c28f472020d 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -110,26 +110,18 @@ 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/m_style = "None" //Marking style + var/r_markings = 0 //Marking colour + var/g_markings = 0 //Marking colour + var/b_markings = 0 //Marking colour var/h_style = "Bald" //Hair type var/r_hair = 0 //Hair color var/g_hair = 0 //Hair color var/b_hair = 0 //Hair color - var/r_hair_sec = 0 //Secondary hair color - var/g_hair_sec = 0 //Secondary hair color - var/b_hair_sec = 0 //Secondary hair color - var/f_style = "Shaved" //Facial hair type - var/r_facial = 0 //Facial hair color - var/g_facial = 0 //Facial hair color - var/b_facial = 0 //Facial hair color - var/r_facial_sec = 0 //Secondary facial hair color - var/g_facial_sec = 0 //Secondary facial hair color - var/b_facial_sec = 0 //Secondary facial hair color + var/f_style = "Shaved" //Face hair type + var/r_facial = 0 //Face hair color + var/g_facial = 0 //Face hair color + var/b_facial = 0 //Face hair color var/s_tone = 0 //Skin tone var/r_skin = 0 //Skin color var/g_skin = 0 //Skin color @@ -137,7 +129,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts var/r_eyes = 0 //Eye color var/g_eyes = 0 //Eye color var/b_eyes = 0 //Eye color - var/alt_head = "None" //Alt head style. var/species = "Human" var/language = "None" //Secondary language @@ -295,44 +286,18 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "[ha_style] " 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)))]
" - 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"]) + if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species that have body markings. 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)))]
" - 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_style]" + dat += "Color [color_square(r_markings, g_markings, b_markings)]
" dat += "Hair: " dat += "[h_style]" - dat += "Color [color_square(r_hair, g_hair, b_hair)]" - var/datum/sprite_accessory/temp_hair_style = hair_styles_list[h_style] - if(temp_hair_style.secondary_theme && !temp_hair_style.no_sec_colour) - dat += " Color #2 [color_square(r_hair_sec, g_hair_sec, b_hair_sec)]" - dat += "
" + dat += "Color [color_square(r_hair, g_hair, b_hair)]
" dat += "Facial Hair: " dat += "[f_style ? "[f_style]" : "Shaved"]" - dat += "Color [color_square(r_facial, g_facial, b_facial)]" - var/datum/sprite_accessory/temp_facial_hair_style = facial_hair_styles_list[f_style] - if(temp_facial_hair_style.secondary_theme && !temp_facial_hair_style.no_sec_colour) - dat += " Color #2 [color_square(r_facial_sec, g_facial_sec, b_facial_sec)]" - dat += "
" - + dat += "Color [color_square(r_facial, g_facial, b_facial)]
" if(species != "Machine") dat += "Eyes: " @@ -355,9 +320,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "Character Records
" dat += "

Limbs

" - if(species in list("Unathi")) //Species with alt heads. - dat += "Alternate Head: " - dat += "[alt_head]
" dat += "Limbs and Parts: Adjust
" if(species != "Slime People" && species != "Machine") dat += "Internal Organs: Adjust
" @@ -1199,6 +1161,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(new_age) age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN) if("species") + var/list/new_species = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin") var/prev_species = species // var/whitelisted = 0 @@ -1268,18 +1231,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts 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 + r_hair = 0//hex2num(copytext(new_hair, 2, 4)) + g_hair = 0//hex2num(copytext(new_hair, 4, 6)) + b_hair = 0//hex2num(copytext(new_hair, 6, 8)) s_tone = 0 @@ -1289,11 +1243,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts 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. + m_style = "None" // No Unathi markings on Tajara body_accessory = null //no vulptail on humans damnit @@ -1344,16 +1294,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts g_hair = hex2num(copytext(new_hair, 4, 6)) b_hair = hex2num(copytext(new_hair, 6, 8)) - if("secondary_hair") - if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) - var/datum/sprite_accessory/hair_style = hair_styles_list[h_style] - 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)) - if("h_style") var/list/valid_hairstyles = list() for(var/hairstyle in hair_styles_list) @@ -1411,46 +1351,22 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(new_head_accessory_style) ha_style = new_head_accessory_style - if("alt_head") - if(organ_data["head"] == "cyborg") - return - if(species in list("Unathi")) //Species with alt heads. - var/list/valid_alt_heads = list() - valid_alt_heads["None"] = alt_heads_list["None"] //The only null entry should be the "None" option - for(var/alternate_head in alt_heads_list) - var/datum/sprite_accessory/alt_heads/head = alt_heads_list[alternate_head] - if(!(species in head.species_allowed)) - continue + if("markings") + if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with markings. + var/input = "Choose the colour of your your character's markings:" + var/new_markings = input(user, input, "Character Preference", rgb(r_markings, g_markings, b_markings)) as color|null + if(new_markings) + r_markings = hex2num(copytext(new_markings, 2, 4)) + g_markings = hex2num(copytext(new_markings, 4, 6)) + b_markings = hex2num(copytext(new_markings, 6, 8)) - valid_alt_heads[alternate_head] = alt_heads_list[alternate_head] - - 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"] - 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) - - if("m_style_head") - if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + if("m_style") + if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species with markings. var/list/valid_markings = list() - valid_markings["None"] = marking_styles_list["None"] for(var/markingstyle in marking_styles_list) - var/datum/sprite_accessory/body_markings/head/M = marking_styles_list[markingstyle] + var/datum/sprite_accessory/M = marking_styles_list[markingstyle] if(!(species in M.species_allowed)) continue - if(M.marking_location != "head") - continue - if(alt_head && alt_head != "None") - if(!(alt_head in M.heads_allowed)) - continue - else - if(M.heads_allowed) - continue if(species == "Machine") //Species that can use prosthetic heads. var/obj/item/organ/external/head/H = new() @@ -1467,86 +1383,9 @@ 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 markings:", "Character Preference", m_style) as null|anything in valid_markings if(new_marking_style) - marking_styles["head"] = new_marking_style - m_styles = list2params(marking_styles) - - 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 - if(new_markings) - marking_colours["head"] = new_markings - m_colours = list2params(marking_colours) - - if("m_style_body") - if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox")) //Species with body markings/tattoos. - var/list/valid_markings = list() - valid_markings["None"] = marking_styles_list["None"] - for(var/markingstyle in marking_styles_list) - var/datum/sprite_accessory/M = marking_styles_list[markingstyle] - if(!(species in M.species_allowed)) - continue - if(M.marking_location != "body") - continue - - 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 - if(new_marking_style) - marking_styles["body"] = new_marking_style - m_styles = list2params(marking_styles) - - 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 - if(new_markings) - marking_colours["body"] = new_markings - m_colours = list2params(marking_colours) - - if("m_style_tail") - if(species in list("Vox", "Vulpkanin")) //Species with tail markings. - var/list/valid_markings = list() - valid_markings["None"] = marking_styles_list["None"] - for(var/markingstyle in marking_styles_list) - var/datum/sprite_accessory/body_markings/tail/M = marking_styles_list[markingstyle] - if(M.marking_location != "tail") - continue - if(!(species in M.species_allowed)) - continue - if(!body_accessory) - if(M.tails_allowed) - continue - else - if(!M.tails_allowed || !(body_accessory in M.tails_allowed)) - continue - - 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 - - if(new_marking_style) - marking_styles["tail"] = new_marking_style - m_styles = list2params(marking_styles) - - 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 - if(new_markings) - marking_colours["tail"] = new_markings - m_colours = list2params(marking_colours) + m_style = new_marking_style if("body_accessory") var/list/possible_body_accessories = list() @@ -1563,9 +1402,6 @@ 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) body_accessory = (new_body_accessory == "None") ? null : new_body_accessory if("facial") @@ -1576,16 +1412,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts g_facial = hex2num(copytext(new_facial, 4, 6)) b_facial = hex2num(copytext(new_facial, 6, 8)) - if("secondary_facial") - if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) - var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[f_style] - 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)) - if("f_style") var/list/valid_facialhairstyles = list() for(var/facialhairstyle in facial_hair_styles_list) @@ -1767,12 +1593,11 @@ 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" - h_style = hair_styles_list["Bald"] + m_style = "None" + h_style = random_hair_style(gender, species) f_style = facial_hair_styles_list["Shaved"] organ_data[limb] = null rlimb_data[limb] = null @@ -1817,15 +1642,11 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts subchoice = input(user, "Which model of [choice] [limb_name] do you wish to use?") as null|anything in robolimb_models if(subchoice) choice = subchoice - if(limb in list("head", "chest", "groin")) - if(species != "Machine") - return - if(limb == "head") - ha_style = "None" - alt_head = null - h_style = hair_styles_list["Bald"] - f_style = facial_hair_styles_list["Shaved"] - marking_styles["head"] = "None" + if(limb == "head") + ha_style = "None" + h_style = hair_styles_list["Bald"] + f_style = facial_hair_styles_list["Shaved"] + m_style = "None" rlimb_data[limb] = choice organ_data[limb] = "cyborg" if(second_limb) @@ -1836,7 +1657,7 @@ 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 @@ -2041,22 +1862,12 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts H.g_hair = g_hair H.b_hair = b_hair - H.r_hair_sec = r_hair_sec - H.g_hair_sec = g_hair_sec - H.b_hair_sec = b_hair_sec - H.r_facial = r_facial H.g_facial = g_facial H.b_facial = b_facial - H.r_facial_sec = r_facial_sec - H.g_facial_sec = g_facial_sec - H.b_facial_sec = b_facial_sec - H.h_style = h_style H.f_style = f_style - - H.alt_head = alt_head //End of head-specific. character.r_skin = r_skin @@ -2145,9 +1956,11 @@ 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)) - character.m_colours = m_colours - character.m_styles = m_styles + if(character.species.bodyflags & HAS_MARKINGS) + character.r_markings = r_markings + character.g_markings = g_markings + character.b_markings = b_markings + character.m_style = m_style if(body_accessory) character.body_accessory = body_accessory_by_name["[body_accessory]"] diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm index cd6177a08f1..f72ac076dff 100644 --- a/code/modules/client/preference/preferences_mysql.dm +++ b/code/modules/client/preference/preferences_mysql.dm @@ -110,28 +110,23 @@ hair_red, hair_green, hair_blue, - secondary_hair_red, - secondary_hair_green, - secondary_hair_blue, facial_red, facial_green, facial_blue, - secondary_facial_red, - secondary_facial_green, - secondary_facial_blue, skin_tone, skin_red, skin_green, skin_blue, - marking_colours, + markings_red, + markings_green, + markings_blue, head_accessory_red, head_accessory_green, head_accessory_blue, hair_style_name, facial_style_name, - marking_styles, + marking_style_name, head_accessory_style_name, - alt_head_name, eyes_red, eyes_green, eyes_blue, @@ -186,68 +181,63 @@ r_hair = text2num(query.item[8]) g_hair = text2num(query.item[9]) b_hair = text2num(query.item[10]) - r_hair_sec = text2num(query.item[11]) - g_hair_sec = text2num(query.item[12]) - b_hair_sec = text2num(query.item[13]) - r_facial = text2num(query.item[14]) - g_facial = text2num(query.item[15]) - b_facial = text2num(query.item[16]) - r_facial_sec = text2num(query.item[17]) - g_facial_sec = text2num(query.item[18]) - b_facial_sec = text2num(query.item[19]) - s_tone = text2num(query.item[20]) - r_skin = text2num(query.item[21]) - g_skin = text2num(query.item[22]) - b_skin = text2num(query.item[23]) - m_colours = 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] - ha_style = query.item[31] - alt_head = query.item[32] - r_eyes = text2num(query.item[33]) - g_eyes = text2num(query.item[34]) - b_eyes = text2num(query.item[35]) - underwear = query.item[36] - undershirt = query.item[37] - backbag = text2num(query.item[38]) - b_type = query.item[39] + r_facial = text2num(query.item[11]) + g_facial = text2num(query.item[12]) + b_facial = text2num(query.item[13]) + s_tone = text2num(query.item[14]) + r_skin = text2num(query.item[15]) + g_skin = text2num(query.item[16]) + b_skin = text2num(query.item[17]) + r_markings = text2num(query.item[18]) + g_markings = text2num(query.item[19]) + b_markings = text2num(query.item[20]) + r_headacc = text2num(query.item[21]) + g_headacc = text2num(query.item[22]) + b_headacc = text2num(query.item[23]) + h_style = query.item[24] + f_style = query.item[25] + m_style = query.item[26] + ha_style = query.item[27] + r_eyes = text2num(query.item[28]) + g_eyes = text2num(query.item[29]) + b_eyes = text2num(query.item[30]) + underwear = query.item[31] + undershirt = query.item[32] + backbag = text2num(query.item[33]) + b_type = query.item[34] //Jobs - alternate_option = text2num(query.item[40]) - job_support_high = text2num(query.item[41]) - job_support_med = text2num(query.item[42]) - job_support_low = text2num(query.item[43]) - job_medsci_high = text2num(query.item[44]) - job_medsci_med = text2num(query.item[45]) - job_medsci_low = text2num(query.item[46]) - job_engsec_high = text2num(query.item[47]) - job_engsec_med = text2num(query.item[48]) - job_engsec_low = text2num(query.item[49]) - job_karma_high = text2num(query.item[50]) - job_karma_med = text2num(query.item[51]) - job_karma_low = text2num(query.item[52]) + alternate_option = text2num(query.item[35]) + job_support_high = text2num(query.item[36]) + job_support_med = text2num(query.item[37]) + job_support_low = text2num(query.item[38]) + job_medsci_high = text2num(query.item[39]) + job_medsci_med = text2num(query.item[40]) + job_medsci_low = text2num(query.item[41]) + job_engsec_high = text2num(query.item[42]) + job_engsec_med = text2num(query.item[43]) + job_engsec_low = text2num(query.item[44]) + job_karma_high = text2num(query.item[45]) + job_karma_med = text2num(query.item[46]) + job_karma_low = text2num(query.item[47]) //Miscellaneous - flavor_text = query.item[53] - med_record = query.item[54] - sec_record = query.item[55] - gen_record = query.item[56] - disabilities = text2num(query.item[57]) - player_alt_titles = params2list(query.item[58]) - organ_data = params2list(query.item[59]) - rlimb_data = params2list(query.item[60]) - nanotrasen_relation = query.item[61] - speciesprefs = text2num(query.item[62]) + flavor_text = query.item[48] + med_record = query.item[49] + sec_record = query.item[50] + gen_record = query.item[51] + disabilities = text2num(query.item[52]) + player_alt_titles = params2list(query.item[53]) + organ_data = params2list(query.item[54]) + rlimb_data = params2list(query.item[55]) + nanotrasen_relation = query.item[56] + speciesprefs = text2num(query.item[57]) //socks - socks = query.item[63] - body_accessory = query.item[64] - gear = params2list(query.item[65]) + socks = query.item[58] + body_accessory = query.item[59] + gear = params2list(query.item[60]) //Sanitize metadata = sanitize_text(metadata, initial(metadata)) @@ -263,26 +253,23 @@ r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair)) g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair)) b_hair = sanitize_integer(b_hair, 0, 255, initial(b_hair)) - r_hair_sec = sanitize_integer(r_hair_sec, 0, 255, initial(r_hair_sec)) - g_hair_sec = sanitize_integer(g_hair_sec, 0, 255, initial(g_hair_sec)) - b_hair_sec = sanitize_integer(b_hair_sec, 0, 255, initial(b_hair_sec)) r_facial = sanitize_integer(r_facial, 0, 255, initial(r_facial)) g_facial = sanitize_integer(g_facial, 0, 255, initial(g_facial)) b_facial = sanitize_integer(b_facial, 0, 255, initial(b_facial)) - r_facial_sec = sanitize_integer(r_facial_sec, 0, 255, initial(r_facial_sec)) - g_facial_sec = sanitize_integer(g_facial_sec, 0, 255, initial(g_facial_sec)) - b_facial_sec = sanitize_integer(b_facial_sec, 0, 255, initial(b_facial_sec)) s_tone = sanitize_integer(s_tone, -185, 34, initial(s_tone)) r_skin = sanitize_integer(r_skin, 0, 255, initial(r_skin)) g_skin = sanitize_integer(g_skin, 0, 255, initial(g_skin)) b_skin = sanitize_integer(b_skin, 0, 255, initial(b_skin)) + r_markings = sanitize_integer(r_markings, 0, 255, initial(r_markings)) + g_markings = sanitize_integer(g_markings, 0, 255, initial(g_markings)) + b_markings = sanitize_integer(b_markings, 0, 255, initial(b_markings)) r_headacc = sanitize_integer(r_headacc, 0, 255, initial(r_headacc)) g_headacc = sanitize_integer(g_headacc, 0, 255, initial(g_headacc)) b_headacc = sanitize_integer(b_headacc, 0, 255, initial(b_headacc)) h_style = sanitize_inlist(h_style, hair_styles_list, initial(h_style)) f_style = sanitize_inlist(f_style, facial_hair_styles_list, initial(f_style)) + m_style = sanitize_inlist(m_style, marking_styles_list, initial(m_style)) ha_style = sanitize_inlist(ha_style, head_accessory_styles_list, initial(ha_style)) - alt_head = sanitize_inlist(alt_head, alt_heads_list, initial(alt_head)) r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes)) g_eyes = sanitize_integer(g_eyes, 0, 255, initial(g_eyes)) b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes)) @@ -313,8 +300,6 @@ if(!player_alt_titles) player_alt_titles = new() if(!organ_data) src.organ_data = list() if(!rlimb_data) src.rlimb_data = list() - if(!m_colours) m_colours = initial(m_colours) - if(!m_styles) m_styles = initial(m_styles) if(!gear) gear = list() return 1 @@ -347,28 +332,23 @@ hair_red='[r_hair]', hair_green='[g_hair]', hair_blue='[b_hair]', - secondary_hair_red='[r_hair_sec]', - secondary_hair_green='[g_hair_sec]', - secondary_hair_blue='[b_hair_sec]', facial_red='[r_facial]', facial_green='[g_facial]', facial_blue='[b_facial]', - secondary_facial_red='[r_facial_sec]', - secondary_facial_green='[g_facial_sec]', - secondary_facial_blue='[b_facial_sec]', skin_tone='[s_tone]', skin_red='[r_skin]', skin_green='[g_skin]', skin_blue='[b_skin]', - marking_colours='[m_colours]', + markings_red='[r_markings]', + markings_green='[g_markings]', + markings_blue='[b_markings]', 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_style_name='[sql_sanitize_text(m_style)]', head_accessory_style_name='[sql_sanitize_text(ha_style)]', - alt_head_name='[sql_sanitize_text(alt_head)]', eyes_red='[r_eyes]', eyes_green='[g_eyes]', eyes_blue='[b_eyes]', @@ -417,13 +397,11 @@ INSERT INTO [format_table_name("characters")] (ckey, slot, OOC_Notes, real_name, name_is_always_random, gender, age, species, language, hair_red, hair_green, hair_blue, - secondary_hair_red, secondary_hair_green, secondary_hair_blue, facial_red, facial_green, facial_blue, - secondary_facial_red, secondary_facial_green, secondary_facial_blue, skin_tone, skin_red, skin_green, skin_blue, - marking_colours, + markings_red, markings_green, markings_blue, head_accessory_red, head_accessory_green, head_accessory_blue, - hair_style_name, facial_style_name, marking_styles, head_accessory_style_name, alt_head_name, + hair_style_name, facial_style_name, marking_style_name, head_accessory_style_name, eyes_red, eyes_green, eyes_blue, underwear, undershirt, backbag, b_type, alternate_option, @@ -440,13 +418,11 @@ ('[C.ckey]', '[default_slot]', '[sql_sanitize_text(metadata)]', '[sql_sanitize_text(real_name)]', '[be_random_name]','[gender]', '[age]', '[sql_sanitize_text(species)]', '[sql_sanitize_text(language)]', '[r_hair]', '[g_hair]', '[b_hair]', - '[r_hair_sec]', '[g_hair_sec]', '[b_hair_sec]', '[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]', + '[r_markings]', '[g_markings]', '[b_markings]', '[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)]', '[sql_sanitize_text(m_style)]', '[sql_sanitize_text(ha_style)]', '[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 07f8d6b7931..c7b9b3abdb6 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_style != "None") to_chat(user, "[target] already has body markings, any more would look silly!") return @@ -62,12 +61,10 @@ 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.m_style = tattoo_icon + target.r_markings = tattoo_r + target.g_markings = tattoo_g + target.b_markings = tattoo_b target.update_markings() diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index 91a6a08cbe7..ca241306f00 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -4,7 +4,13 @@ AC.ui_interact(user, state = state) /mob/living/carbon/human/proc/change_species(var/new_species) - if(!new_species || species == new_species || !(new_species in all_species)) + if(!new_species) + return + + if(species == new_species) + return + + if(!(new_species in all_species)) return set_species(new_species) @@ -34,7 +40,13 @@ /mob/living/carbon/human/proc/change_hair(var/hair_style) var/obj/item/organ/external/head/H = get_organ("head") - if(!hair_style || H.h_style == hair_style || !(hair_style in hair_styles_list)) + if(!hair_style) + return + + if(H.h_style == hair_style) + return + + if(!(hair_style in hair_styles_list)) return H.h_style = hair_style @@ -44,7 +56,13 @@ /mob/living/carbon/human/proc/change_facial_hair(var/facial_hair_style) var/obj/item/organ/external/head/H = get_organ("head") - if(!facial_hair_style || H.f_style == facial_hair_style || !(facial_hair_style in facial_hair_styles_list)) + if(!facial_hair_style) + return + + if(H.f_style == facial_hair_style) + return + + if(!(facial_hair_style in facial_hair_styles_list)) return H.f_style = facial_hair_style @@ -54,7 +72,13 @@ /mob/living/carbon/human/proc/change_head_accessory(var/head_accessory_style) var/obj/item/organ/external/head/H = get_organ("head") - if(!head_accessory_style || H.ha_style == head_accessory_style || !(head_accessory_style in head_accessory_styles_list)) + if(!head_accessory_style) + return + + if(H.ha_style == head_accessory_style) + return + + if(!(head_accessory_style in head_accessory_styles_list)) return H.ha_style = head_accessory_style @@ -62,51 +86,30 @@ update_head_accessory() 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)) +/mob/living/carbon/human/proc/change_markings(var/marking_style) + if(!marking_style) return - var/datum/sprite_accessory/body_markings/marking = marking_styles_list[marking_style] - if(marking.name != "None" && marking.marking_location != location) + if(src.m_style == marking_style) return - var/obj/item/organ/external/head/head_organ = get_organ("head") - if(location == "head") - if(head_organ.alt_head && head_organ.alt_head != "None") - var/datum/sprite_accessory/body_markings/head/H = marking_styles_list[marking_style] - if(marking.name != "None" && (!H.heads_allowed || !(head_organ.alt_head in H.heads_allowed))) - return - else - if(!head_organ.alt_head || head_organ.alt_head == "None") - head_organ.alt_head = "None" - var/datum/sprite_accessory/body_markings/head/H = marking_styles_list[marking_style] - if(H.heads_allowed ) - return + if(!(marking_style in marking_styles_list)) + return - if(location == "tail" && marking.name != "None") - var/datum/sprite_accessory/body_markings/tail/tail_marking = marking_styles_list[marking_style] - if(!body_accessory) - if(tail_marking.tails_allowed) - return - else - if(!tail_marking.tails_allowed || !(body_accessory.name in tail_marking.tails_allowed)) - return + src.m_style = marking_style - marking_styles[location] = marking_style - m_styles = list2params(marking_styles) - - if(location == "tail") - stop_tail_wagging() - else - update_markings() + update_markings() return 1 /mob/living/carbon/human/proc/change_body_accessory(var/body_accessory_style) var/found - if(!body_accessory_style || (src.body_accessory && src.body_accessory.name == body_accessory_style)) + if(!body_accessory_style) return + if(src.body_accessory) + if(src.body_accessory.name == body_accessory_style) + return + for(var/B in body_accessory_by_name) if(B == body_accessory_style) src.body_accessory = body_accessory_by_name[body_accessory_style] @@ -115,39 +118,17 @@ if(!found) return - var/list/marking_styles = params2list(m_styles) - marking_styles["tail"] = "None" - m_styles = list2params(marking_styles) update_tail_layer() return 1 -/mob/living/carbon/human/proc/change_alt_head(var/alternate_head) - var/obj/item/organ/external/head/H = get_organ("head") - if(H.alt_head == alternate_head || (H.status & ORGAN_ROBOT) || (!(species.bodyflags & HAS_ALT_HEADS) && alternate_head != "None") || !(alternate_head in alt_heads_list)) - return - - 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"] - 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) - update_markings() - - update_body(1, 1) //Update the body and force limb icon regeneration to update the head with the new icon. - return 1 - /mob/living/carbon/human/proc/reset_hair() 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. - reset_markings() + if(m_style && m_style != "None") //Resets the markings if they were head markings. + var/datum/sprite_accessory/marking_style = marking_styles_list[m_style] + if(marking_style && marking_style.marking_location == "head") + reset_markings() /mob/living/carbon/human/proc/reset_head_hair() var/obj/item/organ/external/head/H = get_organ("head") @@ -170,30 +151,14 @@ H.f_style = "Shaved" update_fhair() -/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) - else - //this shouldn't happen - marking_styles[location] = "None" +/mob/living/carbon/human/proc/reset_markings() + var/list/valid_markings = generate_valid_markings() + if(valid_markings.len) + m_style = pick(valid_markings) 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) - else - //this shouldn't happen - marking_styles[m_location] = "None" - - m_styles = list2params(marking_styles) - + //this shouldn't happen + m_style = "None" update_markings() - stop_tail_wagging() /mob/living/carbon/human/proc/reset_head_accessory() var/obj/item/organ/external/head/H = get_organ("head") @@ -217,42 +182,26 @@ update_body() return 1 -/mob/living/carbon/human/proc/change_hair_color(var/red, var/green, var/blue, var/secondary) +/mob/living/carbon/human/proc/change_hair_color(var/red, var/green, var/blue) var/obj/item/organ/external/head/H = get_organ("head") - if(!secondary) - if(red == H.r_hair && green == H.g_hair && blue == H.b_hair) - return + if(red == H.r_hair && green == H.g_hair && blue == H.b_hair) + return - H.r_hair = red - H.g_hair = green - H.b_hair = blue - else - if(red == H.r_hair_sec && green == H.g_hair_sec && blue == H.b_hair_sec) - return - - H.r_hair_sec = red - H.g_hair_sec = green - H.b_hair_sec = blue + H.r_hair = red + H.g_hair = green + H.b_hair = blue update_hair() return 1 -/mob/living/carbon/human/proc/change_facial_hair_color(var/red, var/green, var/blue, var/secondary) +/mob/living/carbon/human/proc/change_facial_hair_color(var/red, var/green, var/blue) var/obj/item/organ/external/head/H = get_organ("head") - if(!secondary) - if(red == H.r_facial && green == H.g_facial && blue == H.b_facial) - return + if(red == H.r_facial && green == H.g_facial && blue == H.b_facial) + return - H.r_facial = red - H.g_facial = green - H.b_facial = blue - else - if(red == H.r_facial_sec && green == H.g_facial_sec && blue == H.b_facial_sec) - return - - H.r_facial_sec = red - H.g_facial_sec = green - H.b_facial_sec = blue + H.r_facial = red + H.g_facial = green + H.b_facial = blue update_fhair() return 1 @@ -269,19 +218,15 @@ update_head_accessory() 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]) +/mob/living/carbon/human/proc/change_marking_color(var/red, var/green, var/blue) + if(red == r_markings && green == g_markings && blue == b_markings) return - marking_colours[location] = colour - m_colours = list2params(marking_colours) + r_markings = red + g_markings = green + b_markings = blue - if(location == "tail") - update_tail_layer() - else - update_markings() + update_markings() return 1 @@ -317,7 +262,11 @@ var/datum/species/current_species = all_species[current_species_name] if(check_whitelist && config.usealienwhitelist && !check_rights(R_ADMIN, 0, src)) //If we're using the whitelist, make sure to check it! - if((whitelist.len && !(current_species_name in whitelist)) || (blacklist.len && (current_species_name in blacklist)) || ((current_species.flags & IS_WHITELISTED) && !is_alien_whitelisted(src, current_species_name))) + if(whitelist.len && !(current_species_name in whitelist)) + continue + if(blacklist.len && (current_species_name in blacklist)) + continue + if((current_species.flags & IS_WHITELISTED) && !is_alien_whitelisted(src, current_species_name)) continue valid_species += current_species_name @@ -330,7 +279,9 @@ for(var/hairstyle in hair_styles_list) var/datum/sprite_accessory/S = hair_styles_list[hairstyle] - if((gender == MALE && S.gender == FEMALE) || (gender == FEMALE && S.gender == MALE)) + if(gender == MALE && S.gender == FEMALE) + continue + if(gender == FEMALE && S.gender == MALE) continue 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] @@ -362,7 +313,9 @@ for(var/facialhairstyle in facial_hair_styles_list) var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle] - if((gender == MALE && S.gender == FEMALE) || (gender == FEMALE && S.gender == MALE)) + if(gender == MALE && S.gender == FEMALE) + continue + if(gender == FEMALE && S.gender == MALE) continue 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] @@ -401,37 +354,18 @@ return valid_head_accessories -/mob/living/carbon/human/proc/generate_valid_markings(var/location = "body") +/mob/living/carbon/human/proc/generate_valid_markings() var/list/valid_markings = new() var/obj/item/organ/external/head/H = get_organ("head") 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 + var/datum/sprite_accessory/S = marking_styles_list[marking] + if(!(species.name 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.name in S.tails_allowed)) - continue - if(location == "head") - var/datum/sprite_accessory/body_markings/head/M = marking_styles_list[S.name] - if(H.species.flags & ALL_RPARTS)//If the user is a species that can have a robotic head... - var/datum/robolimb/robohead = all_robolimbs[H.model] - if(!(S.models_allowed && (robohead.company in S.models_allowed))) //Make sure they don't get markings incompatible with their head. - continue - else if(H.alt_head && H.alt_head != "None") //If the user's got an alt head, validate markings for that head. - if(!(H.alt_head in M.heads_allowed)) - continue - else - if(M.heads_allowed) - continue + if(H.species.flags & ALL_RPARTS) //If the user is a species that can have a robotic head... + var/datum/robolimb/robohead = all_robolimbs[H.model] + if(!(S.models_allowed && (robohead.company in S.models_allowed))) //Make sure they don't get markings incompatible with their head. + continue valid_markings += marking return valid_markings @@ -451,15 +385,3 @@ valid_body_accessories += B return valid_body_accessories - -/mob/living/carbon/human/proc/generate_valid_alt_heads() - var/list/valid_alt_heads = list() - valid_alt_heads["None"] = alt_heads_list["None"] //The only null entry should be the "None" option, and there should always be a "None" option. - for(var/alternate_head in alt_heads_list) - var/datum/sprite_accessory/alt_heads/head = alt_heads_list[alternate_head] - if(!(species.name in head.species_allowed)) - continue - - valid_alt_heads[alternate_head] = alt_heads_list[alternate_head] - - return valid_alt_heads \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/body_accessories.dm b/code/modules/mob/living/carbon/human/body_accessories.dm index 8744a09ea4d..f4b95eec4d4 100644 --- a/code/modules/mob/living/carbon/human/body_accessories.dm +++ b/code/modules/mob/living/carbon/human/body_accessories.dm @@ -112,30 +112,36 @@ var/global/list/body_accessory_by_species = list("None" = null) //Vulpkanin /datum/body_accessory/tail/vulpkanin_2 name = "Vulpkanin Alt 1 (Bushy)" + icon_state = "vulptail2" animated_icon_state = "vulptail2_a" allowed_species = list("Vulpkanin") /datum/body_accessory/tail/vulpkanin_3 name = "Vulpkanin Alt 2 (Straight)" + icon_state = "vulptail3" animated_icon_state = "vulptail3_a" allowed_species = list("Vulpkanin") /datum/body_accessory/tail/vulpkanin_4 name = "Vulpkanin Alt 3 (Tiny)" + icon_state = "vulptail4" animated_icon_state = "vulptail4_a" allowed_species = list("Vulpkanin") /datum/body_accessory/tail/vulpkanin_5 name = "Vulpkanin Alt 4 (Short)" + icon_state = "vulptail5" animated_icon_state = "vulptail5_a" allowed_species = list("Vulpkanin") /datum/body_accessory/tail/vulpkanin_6 name = "Vulpkanin Alt 5 (Straight Bushy)" + icon_state = "vulptail6" animated_icon_state = "vulptail6_a" allowed_species = list("Vulpkanin") + diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index ab176e6912f..c63c03d8321 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1587,12 +1587,6 @@ H.g_headacc = 0 H.b_headacc = 0 - m_styles = initial(m_styles) //Wipes out markings, setting them all to "None". - m_colours = initial(m_styles) //Defaults colour to #00000 for all markings. - H.alt_head = "None" - H.ha_style = "None" - body_accessory = null - if(!dna) dna = new /datum/dna(null) dna.species = species.name @@ -1693,15 +1687,14 @@ 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", rgb(r_markings, g_markings, b_markings)) 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) + r_markings = hex2num(copytext(optic_colour, 2, 4)) + g_markings = hex2num(copytext(optic_colour, 4, 6)) + b_markings = hex2num(copytext(optic_colour, 6, 8)) update_markings() else if(robohead.is_monitor) //Means that the character's head is a monitor (has a screen). Time to customize. diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 0626c89fa1f..a74409a9b44 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -4,12 +4,10 @@ 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/r_markings = 0 + var/g_markings = 0 + var/b_markings = 0 + var/m_style = "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..6268652f828 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -8,7 +8,7 @@ language = "Sol Common" flags = HAS_LIPS | CAN_BE_FAT clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = HAS_SKIN_TONE | HAS_BODY_MARKINGS + bodyflags = HAS_SKIN_TONE dietflags = DIET_OMNI unarmed_type = /datum/unarmed_attack/punch blurb = "Humanity originated in the Sol system, and over the last five centuries has spread \ @@ -40,7 +40,7 @@ flags = HAS_LIPS clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = FEET_CLAWS | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_BODY_MARKINGS | HAS_HEAD_MARKINGS | HAS_SKIN_COLOR | HAS_ALT_HEADS | TAIL_WAGGING + bodyflags = FEET_CLAWS | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING dietflags = DIET_CARN cold_level_1 = 280 //Default 260 - Lower is better @@ -112,11 +112,13 @@ flags = HAS_LIPS | CAN_BE_FAT clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_HEAD_MARKINGS | HAS_BODY_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING | HAS_FUR + bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING | HAS_FUR dietflags = DIET_OMNI reagent_tag = PROCESS_ORG flesh_color = "#AFA59E" - base_color = "#424242" + base_color = "#333333" + //Default styles for created mobs. + default_headacc = "Tajaran Ears" butt_sprite = "tajaran" has_organ = list( @@ -162,11 +164,11 @@ 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 | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING | HAS_FUR dietflags = DIET_OMNI reagent_tag = PROCESS_ORG flesh_color = "#966464" - base_color = "#CF4D2F" + base_color = "#B43214" butt_sprite = "vulp" has_organ = list( @@ -210,7 +212,7 @@ flags = HAS_LIPS clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = HAS_SKIN_COLOR | HAS_BODY_MARKINGS + bodyflags = HAS_SKIN_COLOR dietflags = DIET_HERB flesh_color = "#8CD7A3" blood_color = "#1D2CBF" @@ -285,7 +287,7 @@ flags = NO_SCAN | IS_WHITELISTED clothing_flags = HAS_SOCKS dietflags = DIET_OMNI - bodyflags = HAS_ICON_SKIN_TONE | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_BODY_MARKINGS | HAS_TAIL_MARKINGS + bodyflags = HAS_ICON_SKIN_TONE | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED blood_color = "#2299FC" flesh_color = "#808D11" @@ -702,7 +704,6 @@ flags = IS_WHITELISTED | HAS_LIPS | CAN_BE_FAT clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = HAS_BODY_MARKINGS dietflags = DIET_HERB reagent_tag = PROCESS_ORG blood_color = "#A200FF" @@ -851,7 +852,7 @@ flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_DNA | NO_POISON | RADIMMUNE | ALL_RPARTS clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = HAS_SKIN_COLOR | HAS_HEAD_MARKINGS | HAS_HEAD_ACCESSORY + bodyflags = HAS_SKIN_COLOR | HAS_MARKINGS | HAS_HEAD_ACCESSORY dietflags = 0 //IPCs can't eat, so no diet blood_color = "#1F181F" flesh_color = "#AAAAAA" diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 130ea34f93d..b919912a6c1 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -212,15 +212,15 @@ var/global/list/damage_icon_parts = list() if(update_icons) update_icons() //BASE MOB SPRITE -/mob/living/carbon/human/proc/update_body(var/update_icons=1, var/rebuild_base=0) +/mob/living/carbon/human/proc/update_body(var/update_icons=1) var/husk_color_mod = rgb(96,88,80) var/hulk_color_mod = rgb(48,224,40) - var/husk = (HUSK in mutations) - var/fat = (FAT in mutations) - var/hulk = (HULK in mutations) - var/skeleton = (SKELETON in mutations) + var/husk = (HUSK in src.mutations) + var/fat = (FAT in src.mutations) + var/hulk = (HULK in src.mutations) + var/skeleton = (SKELETON in src.mutations) if(species && species.bodyflags & HAS_ICON_SKIN_TONE) species.updatespeciescolor(src) @@ -262,7 +262,7 @@ var/global/list/damage_icon_parts = list() icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0]" var/icon/base_icon - if(human_icon_cache[icon_key] && !rebuild_base) + if(human_icon_cache[icon_key]) base_icon = human_icon_cache[icon_key] else //BEGIN CACHED ICON GENERATION. @@ -309,7 +309,7 @@ var/global/list/damage_icon_parts = list() //END CACHED ICON GENERATION. stand_icon.Blend(base_icon,ICON_OVERLAY) - if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the user's species is flagged to have a tail that needs to be overlapped by limbs... (having a non-tail body accessory like the snake body will override this) + if(src.species.bodyflags & TAIL_OVERLAPPED) // If the user's species is flagged to have a tail that needs to be overlapped by limbs... overlays_standing[LIMBS_LAYER] = image(stand_icon) // Diverts limbs to their own layer so they can overlay things (i.e. tails). else overlays_standing[LIMBS_LAYER] = null // So we don't get the old species' sprite splatted on top of the new one's @@ -360,38 +360,29 @@ var/global/list/damage_icon_parts = list() //MARKINGS OVERLAY /mob/living/carbon/human/proc/update_markings(var/update_icons=1) - //Reset our markings. + //Reset our markings overlays_standing[MARKINGS_LAYER] = null - //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"] - 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) - 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"] - 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) - markings_standing.Blend(h_marking_s, ICON_OVERLAY) + if(!chest_organ || chest_organ.is_stump() || (chest_organ.status & ORGAN_DESTROYED) ) + if(update_icons) update_icons() + return + + //base icons + var/icon/markings_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") + + if(m_style && m_style != "None") + var/datum/sprite_accessory/marking_style = marking_styles_list[m_style] + if(marking_style) + var/obj/item/organ/external/head/head_organ = get_organ("head") + if((!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED)) && marking_style.marking_location == "head") + return //If the head is destroyed and it is the organ the marking is located on, get us out of here. This prevents floating optical markings on decapitated IPCs, for example. + var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s") + if(marking_style.do_colouration) + markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD) + markings_standing.Blend(markings_s, ICON_OVERLAY) + else + //warning("Invalid m_style for [species.name]: [m_style]") overlays_standing[MARKINGS_LAYER] = image(markings_standing) @@ -435,15 +426,15 @@ var/global/list/damage_icon_parts = list() //HAIR OVERLAY /mob/living/carbon/human/proc/update_hair(var/update_icons=1) //Reset our hair - overlays_standing[HAIR_LAYER] = null + overlays_standing[HAIR_LAYER] = null var/obj/item/organ/external/head/head_organ = get_organ("head") - if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED)) + if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) ) if(update_icons) update_icons() return //masks and helmets can obscure our hair, unless we're a synthetic - 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 @@ -463,19 +454,13 @@ var/global/list/damage_icon_parts = list() else if(hair_style.do_colouration) hair_s.Blend(rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair), ICON_ADD) - if(hair_style.secondary_theme) - var/icon/hair_secondary_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_[hair_style.secondary_theme]_s") - if(!hair_style.no_sec_colour) - hair_secondary_s.Blend(rgb(head_organ.r_hair_sec, head_organ.g_hair_sec, head_organ.b_hair_sec), ICON_ADD) - hair_s.Blend(hair_secondary_s, ICON_OVERLAY) - hair_standing = hair_s //hair_standing.Blend(hair_s, ICON_OVERLAY) //Having it this way preserves animations. Useful for IPC screens. else //warning("Invalid h_style for [species.name]: [h_style]") //hair_standing.Blend(debrained_s, ICON_OVERLAY)//how does i overlay for fish? - overlays_standing[HAIR_LAYER] = image(hair_standing) + overlays_standing[HAIR_LAYER] = image(hair_standing) if(update_icons) update_icons() @@ -483,15 +468,15 @@ var/global/list/damage_icon_parts = list() //FACIAL HAIR OVERLAY /mob/living/carbon/human/proc/update_fhair(var/update_icons=1) //Reset our facial hair - overlays_standing[FHAIR_LAYER] = null + overlays_standing[FHAIR_LAYER] = null var/obj/item/organ/external/head/head_organ = get_organ("head") - if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED)) + if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) ) if(update_icons) update_icons() return //masks and helmets can obscure our facial hair, unless we're a synthetic - 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 @@ -507,18 +492,11 @@ var/global/list/damage_icon_parts = list() facial_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_AND) else if(facial_hair_style.do_colouration) facial_s.Blend(rgb(head_organ.r_facial, head_organ.g_facial, head_organ.b_facial), ICON_ADD) - - if(facial_hair_style.secondary_theme) - var/icon/facial_secondary_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_[facial_hair_style.secondary_theme]_s") - if(!facial_hair_style.no_sec_colour) - facial_secondary_s.Blend(rgb(head_organ.r_facial_sec, head_organ.g_facial_sec, head_organ.b_facial_sec), ICON_ADD) - facial_s.Blend(facial_secondary_s, ICON_OVERLAY) - face_standing.Blend(facial_s, ICON_OVERLAY) else //warning("Invalid f_style for [species.name]: [f_style]") - overlays_standing[FHAIR_LAYER] = image(face_standing) + overlays_standing[FHAIR_LAYER] = image(face_standing) if(update_icons) update_icons() @@ -558,7 +536,7 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/proc/update_mutantrace(var/update_icons=1) //BS12 EDIT - var/skel = (SKELETON in mutations) + var/skel = (SKELETON in src.mutations) if(skel) skeleton = 'icons/mob/human_races/r_skeleton.dmi' else @@ -584,7 +562,7 @@ var/global/list/damage_icon_parts = list() ..() if(notransform) return update_mutations(0) - update_body(0, 1) //Update the body and force limb icon regeneration. + update_body(0) update_hair(0) update_head_accessory(0) update_fhair(0) @@ -1075,7 +1053,7 @@ var/global/list/damage_icon_parts = list() clear_alert("legcuffed") if(legcuffed) overlays_standing[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1") - throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = legcuffed) + throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = src.legcuffed) if(m_intent != "walk") m_intent = "walk" if(hud_used && hud_used.move_intent) @@ -1143,69 +1121,71 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/proc/update_tail_layer(var/update_icons=1) overlays_standing[TAIL_UNDERLIMBS_LAYER] = null // SEW direction icons, overlayed by LIMBS_LAYER. - overlays_standing[TAIL_LAYER] = null /* This will be one of two things: - 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"]) - 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) + overlays_standing[TAIL_LAYER] = null // This will be one of two things: + // 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. if(body_accessory) if(body_accessory.try_restrictions(src)) var/icon/accessory_s = new/icon("icon" = body_accessory.icon, "icon_state" = body_accessory.icon_state) if(species.bodyflags & HAS_SKIN_COLOR) accessory_s.Blend(rgb(r_skin, g_skin, b_skin), body_accessory.blend_mode) - if(tail_marking_icon && (body_accessory.name in tail_marking_style.tails_allowed)) - accessory_s.Blend(tail_marking_icon, ICON_OVERLAY) - if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this) - // Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway. - var/icon/under = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "accessory_none_s") - under.Insert(new/icon(accessory_s, dir=SOUTH), dir=SOUTH) - under.Insert(new/icon(accessory_s, dir=EAST), dir=EAST) - under.Insert(new/icon(accessory_s, dir=WEST), dir=WEST) - overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(under, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) + if(species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... + // Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway. + var/icon/temp1 = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") + if(species.name in body_accessory.allowed_species) + var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "[species.tail]_delay") + temp1 = temp + else + var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "vulptail_delay") + temp1 = temp + + temp1.Insert(new/icon(accessory_s,dir=SOUTH),dir=SOUTH) + temp1.Insert(new/icon(accessory_s,dir=EAST),dir=EAST) + temp1.Insert(new/icon(accessory_s,dir=WEST),dir=WEST) + + overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(temp1, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) // Creates a blank icon, and copies accessory_s' north direction sprite into it // before passing that to the tail layer that overlays uniforms and such. - var/icon/over = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "accessory_none_s") - over.Insert(new/icon(accessory_s, dir=NORTH), dir=NORTH) + var/icon/temp2 = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") + if(species.name in body_accessory.allowed_species) + var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "[species.tail]_delay") + temp2 = temp + else + var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "vulptail_delay") + temp2 = temp - overlays_standing[TAIL_LAYER] = image(over, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) + temp2.Insert(new/icon(accessory_s,dir=NORTH),dir=NORTH) + + overlays_standing[TAIL_LAYER] = image(temp2, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation. - overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) + overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) else if(species.tail && species.bodyflags & HAS_TAIL) //no tailless tajaran if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space)) var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s") if(species.bodyflags & HAS_SKIN_COLOR) tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD) - if(tail_marking_icon) - tail_s.Blend(tail_marking_icon, ICON_OVERLAY) - if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this) + + if(species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... // Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway. - var/icon/under = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "blank") - under.Insert(new/icon(tail_s, dir=SOUTH), dir=SOUTH) - under.Insert(new/icon(tail_s, dir=EAST), dir=EAST) - under.Insert(new/icon(tail_s, dir=WEST), dir=WEST) + var/icon/temp1 = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_delay") + temp1.Insert(new/icon(tail_s,dir=SOUTH),dir=SOUTH) + temp1.Insert(new/icon(tail_s,dir=EAST),dir=EAST) + temp1.Insert(new/icon(tail_s,dir=WEST),dir=WEST) - overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(under) + overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(temp1) - // Creates a blank icon, and copies accessory_s' north direction sprite into it before passing that to the tail layer that overlays uniforms and such. - var/icon/over = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "blank") - over.Insert(new/icon(tail_s, dir=NORTH), dir=NORTH) + // Creates a blank icon, and copies accessory_s' north direction sprite into it + // before passing that to the tail layer that overlays uniforms and such. + var/icon/temp2 = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_delay") + temp2.Insert(new/icon(tail_s,dir=NORTH),dir=NORTH) - overlays_standing[TAIL_LAYER] = image(over) + overlays_standing[TAIL_LAYER] = image(temp2) else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation. - overlays_standing[TAIL_LAYER] = image(tail_s) + overlays_standing[TAIL_LAYER] = image(tail_s) if(update_icons) update_icons() @@ -1213,70 +1193,70 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/proc/start_tail_wagging(var/update_icons=1) overlays_standing[TAIL_UNDERLIMBS_LAYER] = null // SEW direction icons, overlayed by LIMBS_LAYER. - overlays_standing[TAIL_LAYER] = null /* This will be one of two things: - 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"]) - 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) + overlays_standing[TAIL_LAYER] = null // This will be one of two things: + // 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. if(body_accessory) var/icon/accessory_s = new/icon("icon" = body_accessory.get_animated_icon(), "icon_state" = body_accessory.get_animated_icon_state()) if(species.bodyflags & HAS_SKIN_COLOR) accessory_s.Blend(rgb(r_skin, g_skin, b_skin), body_accessory.blend_mode) - if(tail_marking_icon && (body_accessory.name in tail_marking_style.tails_allowed)) - accessory_s.Blend(tail_marking_icon, ICON_OVERLAY) - if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this) + + if(species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... // Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway. - var/icon/under = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "Vulpkanin_tail_delay") - if(body_accessory.allowed_species && (species.name in body_accessory.allowed_species)) - under = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.name]_tail_delay") - under.Insert(new/icon(accessory_s, dir=SOUTH), dir=SOUTH) - under.Insert(new/icon(accessory_s, dir=EAST), dir=EAST) - under.Insert(new/icon(accessory_s, dir=WEST), dir=WEST) + var/icon/temp1 = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") + if(body_accessory.allowed_species) + if(species.name in body_accessory.allowed_species) + var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "[species.tail]_delay") + temp1 = temp + else + var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "vulptail_delay") + temp1 = temp - overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(under, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) + temp1.Insert(accessory_s,dir=SOUTH) + temp1.Insert(accessory_s,dir=EAST) + temp1.Insert(accessory_s,dir=WEST) - // Creates a blank icon, and copies accessory_s' north direction sprite into it before passing that to the tail layer that overlays uniforms and such. - var/icon/over = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "Vulpkanin_tail_delay") - if(body_accessory.allowed_species && (species.name in body_accessory.allowed_species)) // If the user's species is in the list of allowed species for the currently selected body accessory, use the appropriate animation timing blank - over = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.name]_tail_delay") - over.Insert(new/icon(accessory_s, dir=NORTH), dir=NORTH) + overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(temp1, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) - overlays_standing[TAIL_LAYER] = image(over, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) + // Creates a blank icon, and copies accessory_s' north direction sprite into it + // before passing that to the tail layer that overlays uniforms and such. + var/icon/temp2 = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") + if(species.name in body_accessory.allowed_species) // If the user's species is in the list of allowed species for the currently selected body accessory, use the appropriate animation timing blank + var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "[species.tail]_delay") + temp2 = temp + else // Else if the user's species is not in the list of allowed species for the currently selected body accessory, this point must have been reached by admin-override. Use vulpkanin timings as default. + var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "vulptail_delay") + temp2 = temp + + temp2.Insert(accessory_s,dir=NORTH) + + overlays_standing[TAIL_LAYER] = image(temp2, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation. - overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) + overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset) else if(species.tail && species.bodyflags & HAS_TAIL) var/icon/tailw_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]w_s") if(species.bodyflags & HAS_SKIN_COLOR) tailw_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD) - if(tail_marking_icon) - tailw_s.Blend(tail_marking_icon, ICON_OVERLAY) - if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this) + + if(species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... // Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway. - var/icon/under = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.name]_tail_delay") - under.Insert(new/icon(tailw_s, dir=SOUTH), dir=SOUTH) - under.Insert(new/icon(tailw_s, dir=EAST), dir=EAST) - under.Insert(new/icon(tailw_s, dir=WEST), dir=WEST) + var/icon/temp1 = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_delay") + temp1.Insert(tailw_s,dir=SOUTH) + temp1.Insert(tailw_s,dir=EAST) + temp1.Insert(tailw_s,dir=WEST) - overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(under) + overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(temp1) - // Creates a blank icon, and copies accessory_s' north direction sprite into it before passing that to the tail layer that overlays uniforms and such. - var/icon/over = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.name]_tail_delay") - over.Insert(new/icon(tailw_s, dir=NORTH), dir=NORTH) + // Creates a blank icon, and copies accessory_s' north direction sprite into it + // before passing that to the tail layer that overlays uniforms and such. + var/icon/temp2 = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_delay") + temp2.Insert(tailw_s,dir=NORTH) - overlays_standing[TAIL_LAYER] = image(over) + overlays_standing[TAIL_LAYER] = image(temp2) else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation. - overlays_standing[TAIL_LAYER] = image(tailw_s) + overlays_standing[TAIL_LAYER] = image(tailw_s) if(update_icons) update_icons() @@ -1302,15 +1282,17 @@ var/global/list/damage_icon_parts = list() if(wear_suit.icon_override) var/icon_path = "[wear_suit.icon_override]" icon_path = "[copytext(icon_path, 1, findtext(icon_path, "/suit.dmi"))]/collar.dmi" //If this file doesn't exist, the end result is that COLLAR_LAYER will be unchanged (empty). + var/icon/icon_file if(fexists(icon_path)) //Just ensuring the nonexistance of a file with the above path won't cause a runtime. - var/icon/icon_file = new(icon_path) - standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]") + icon_file = new(icon_path) + standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]") else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.name]) var/icon_path = "[wear_suit.sprite_sheets[species.name]]" icon_path = "[copytext(icon_path, 1, findtext(icon_path, "/suit.dmi"))]/collar.dmi" //If this file doesn't exist, the end result is that COLLAR_LAYER will be unchanged (empty). + var/icon/icon_file if(fexists(icon_path)) //Just ensuring the nonexistance of a file with the above path won't cause a runtime. - var/icon/icon_file = new(icon_path) - standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]") + icon_file = new(icon_path) + standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]") else if(wear_suit.icon_state in C.IconStates()) standing = image("icon" = C, "icon_state" = "[wear_suit.icon_state]") diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 4c55cc9ba71..dc0916ee344 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -221,12 +221,26 @@ fat="_fat" preview_icon = new /icon(icobase, "torso_[g][fat]") preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY) - var/head = "head" - if(alt_head && current_species.bodyflags & HAS_ALT_HEADS) - var/datum/sprite_accessory/alt_heads/H = alt_heads_list[alt_head] - if(H.icon_state) - head = H.icon_state - preview_icon.Blend(new /icon(icobase, "[head]_[g]"), ICON_OVERLAY) + preview_icon.Blend(new /icon(icobase, "head_[g]"), ICON_OVERLAY) + + //Tail + if(current_species && (current_species.bodyflags & HAS_TAIL)) + var/tail_icon + var/tail_icon_state + + if(body_accessory) + var/datum/body_accessory/accessory = body_accessory_by_name[body_accessory] + tail_icon = accessory.icon + tail_icon_state = accessory.icon_state + else + tail_icon = "icons/effects/species.dmi" + if(coloured_tail) + tail_icon_state = "[coloured_tail]_s" + else + tail_icon_state = "[current_species.tail]_s" + + var/icon/temp = new /icon("icon" = tail_icon, "icon_state" = tail_icon_state) + preview_icon.Blend(temp, ICON_OVERLAY) for(var/name in list("chest", "groin", "head", "r_arm", "r_hand", "r_leg", "r_foot", "l_leg", "l_foot", "l_arm", "l_hand")) if(organ_data[name] == "amputated") continue @@ -251,60 +265,13 @@ else preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) - //Tail - if(current_species && (current_species.bodyflags & HAS_TAIL)) - var/tail_icon - var/tail_icon_state - - if(body_accessory) - var/datum/body_accessory/accessory = body_accessory_by_name[body_accessory] - tail_icon = accessory.icon - tail_icon_state = accessory.icon_state - else - tail_icon = "icons/effects/species.dmi" - if(coloured_tail) - tail_icon_state = "[coloured_tail]_s" - else - tail_icon_state = "[current_species.tail]_s" - - var/icon/temp = new /icon("icon" = tail_icon, "icon_state" = tail_icon_state) - - if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR)) - 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/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) - 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/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) - preview_icon.Blend(b_marking_s, ICON_OVERLAY) - if(current_species.bodyflags & HAS_HEAD_MARKINGS) //Head markings. - var/head_marking = marking_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) - preview_icon.Blend(h_marking_s, ICON_OVERLAY) + //Body Markings + if(current_species && (current_species.bodyflags & HAS_MARKINGS)) + var/datum/sprite_accessory/marking_style = marking_styles_list[m_style] + if(marking_style && marking_style.species_allowed) + var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s") + markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD) + preview_icon.Blend(markings_s, ICON_OVERLAY) var/icon/face_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "bald_s") @@ -321,13 +288,6 @@ hair_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_ADD) else hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD) - - if(hair_style.secondary_theme) - var/icon/hair_secondary_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_[hair_style.secondary_theme]_s") - if(!hair_style.no_sec_colour) - hair_secondary_s.Blend(rgb(r_hair_sec, g_hair_sec, b_hair_sec), ICON_ADD) - hair_s.Blend(hair_secondary_s, ICON_OVERLAY) - face_s.Blend(hair_s, ICON_OVERLAY) //Head Accessory @@ -345,13 +305,6 @@ facial_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_ADD) else facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD) - - if(facial_hair_style.secondary_theme) - var/icon/facial_secondary_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_[facial_hair_style.secondary_theme]_s") - if(!facial_hair_style.no_sec_colour) - facial_secondary_s.Blend(rgb(r_facial_sec, g_facial_sec, b_facial_sec), ICON_ADD) - facial_s.Blend(facial_secondary_s, ICON_OVERLAY) - face_s.Blend(facial_s, ICON_OVERLAY) var/icon/underwear_s = null diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index d9a7a84f9fd..3ade5970d03 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -43,12 +43,8 @@ // Restrict some styles to specific species var/list/species_allowed = list("Human", "Slime People") - var/list/models_allowed = list() //Specifies which, if any, hairstyles or markings can be accessed by which prosthetics. Should equal the manufacturing company name in robolimbs.dm. - var/list/heads_allowed = null //Specifies which, if any, alt heads a head marking, hairstyle or facial hair style is compatible with. - var/list/tails_allowed = null //Specifies which, if any, tails a tail marking is compatible with. + var/models_allowed = list() //Specifies which, if any, hairstyles can be accessed by which prosthetics. Should equal the manufacturing company name in robolimbs.dm. var/marking_location //Specifies which bodypart a body marking is located on. - var/secondary_theme = null //If exists, there's a secondary colour to that hair style and the secondary theme's icon state's suffix is equal to this. - var/no_sec_colour = null //If exists, prohibit the colouration of the secondary theme. // Whether or not the accessory can be affected by colouration var/do_colouration = 1 @@ -69,7 +65,7 @@ name = "Bald" icon_state = "bald" gender = MALE - species_allowed = list("Human", "Unathi", "Vox", "Diona", "Kidan", "Grey", "Plasmaman", "Skeleton", "Vulpkanin", "Tajaran") + species_allowed = list("Human", "Unathi", "Vox", "Diona", "Kidan", "Grey", "Plasmaman", "Skeleton") short name = "Short Hair" // try to capatilize the names please~ @@ -204,19 +200,6 @@ icon_state = "hair_hbraid" gender = FEMALE - braid_hip - name = "Hippie Braid" - icon_state = "hair_hipbraid" - species_allowed = list("Human") - secondary_theme = "beads" - - - braid_hip_una - name = "Unathi Hippie Braid" - icon_state = "hair_ubraid" - species_allowed = list("Unathi") - secondary_theme = "beads" - buzz name = "Buzzcut" icon_state = "hair_buzzcut" @@ -258,9 +241,9 @@ icon_state = "hair_bigafro" gender = MALE - sergeant + sargeant name = "Flat Top" - icon_state = "hair_sergeant" + icon_state = "hair_sargeant" gender = MALE emo @@ -315,7 +298,7 @@ icon_state = "hair_spikey" species_allowed = list("Human", "Unathi") - kusanagi + kusangi name = "Kusanagi Hair" icon_state = "hair_kusanagi" @@ -706,117 +689,95 @@ skr_gold_m name = "Gold plated Skrell Male Tentacles" - icon_state = "skrell_hair_m" + icon_state = "skrell_goldhair_m" species_allowed = list("Skrell") gender = MALE - secondary_theme = "gold" - no_sec_colour = 1 skr_gold_f name = "Gold chained Skrell Female Tentacles" - icon_state = "skrell_hair_f" + icon_state = "skrell_goldhair_f" species_allowed = list("Skrell") gender = FEMALE - secondary_theme = "gold" - no_sec_colour = 1 - skr_clothtentacle_m name = "Cloth draped Skrell Male Tentacles" - icon_state = "skrell_hair_m" + icon_state = "skrell_clothhair_m" species_allowed = list("Skrell") gender = MALE - secondary_theme = "cloth" skr_clothtentacle_f name = "Cloth draped Skrell Female Tentacles" - icon_state = "skrell_hair_f" + icon_state = "skrell_clothhair_f" species_allowed = list("Skrell") gender = FEMALE - secondary_theme = "cloth" - taj_hair_clean + taj_ears + name = "Tajaran Ears" + icon_state = "ears_plain" + species_allowed = list("Tajaran") + + taj_ears_clean name = "Tajara Clean" icon_state = "hair_clean" species_allowed = list("Tajaran") - taj_hair_bangs + taj_ears_bangs name = "Tajara Bangs" icon_state = "hair_bangs" species_allowed = list("Tajaran") - taj_hair_braid + taj_ears_braid name = "Tajara Braid" icon_state = "hair_tbraid" species_allowed = list("Tajaran") - secondary_theme = "beads" - taj_hair_shaggy + taj_ears_shaggy name = "Tajara Shaggy" icon_state = "hair_shaggy" species_allowed = list("Tajaran") - taj_hair_mohawk + taj_ears_mohawk name = "Tajaran Mohawk" icon_state = "hair_mohawk" species_allowed = list("Tajaran") - taj_hair_plait + taj_ears_plait name = "Tajara Plait" icon_state = "hair_plait" species_allowed = list("Tajaran") - taj_hair_straight + taj_ears_straight name = "Tajara Straight" icon_state = "hair_straight" species_allowed = list("Tajaran") - taj_hair_long + taj_ears_long name = "Tajara Long" icon_state = "hair_long" species_allowed = list("Tajaran") - taj_hair_rattail + taj_ears_rattail name = "Tajara Rat Tail" icon_state = "hair_rattail" species_allowed = list("Tajaran") - taj_hair_spiky - name = "Tajara Spikey" - icon_state = "hair_tajspikey" + taj_ears_spiky + name = "Tajara Spiky" + icon_state = "hair_tajspiky" species_allowed = list("Tajaran") - taj_hair_messy + taj_ears_messy name = "Tajara Messy" icon_state = "hair_messy" species_allowed = list("Tajaran") - taj_hair_curls - name = "Tajara Curly" - icon_state = "hair_curly" - species_allowed = list("Tajaran") - - taj_hair_wife - name = "Tajaran Ladies' Retro" - icon_state = "hair_ladies_retro" - species_allowed = list("Tajaran") - - taj_hair_victory - name = "Tajara Victory Curls" - icon_state = "hair_victory" - species_allowed = list("Tajaran") - - taj_hair_bob - name = "Tajara Bob" - icon_state = "hair_tbob" - species_allowed = list("Tajaran") - - taj_hair_fingercurl - name = "Tajara Finger Curls" - icon_state = "hair_fingerwave" - species_allowed = list("Tajaran") - //Vulpkanin + + vulp_hair_none + name = "None" + icon_state = "bald" + species_allowed = list("Vulpkanin") + vulp_hair_kajam name = "Kajam" icon_state = "kajam" @@ -851,7 +812,6 @@ name = "Belle" icon_state = "belle" species_allowed = list("Vulpkanin") - secondary_theme = "bands" vulp_hair_bun name = "Bun" @@ -888,12 +848,6 @@ icon_state = "spike" species_allowed = list("Vulpkanin") - vulp_hair_braided - name = "Braided" - icon_state = "braided" - species_allowed = list("Vulpkanin") - secondary_theme = "beads" - //Vox vox_quills_short @@ -1127,12 +1081,6 @@ species_allowed = list("Unathi") gender = NEUTER - una_frills_aquatic - name = "Aquatic Frills" - icon_state = "soghun_aquaticfrills" - species_allowed = list("Unathi") - gender = NEUTER - una_frills_long name = "Long Frills" icon_state = "soghun_longfrills" @@ -1145,25 +1093,22 @@ species_allowed = list("Unathi") gender = NEUTER - una_frills_webbed_aquatic - name = "Aquatic Webbed Frills" - icon_state = "soghun_aquaticfrills" - species_allowed = list("Unathi") - secondary_theme = "webbing" - gender = NEUTER - una_frills_webbed_long name = "Long Webbed Frills" - icon_state = "soghun_longfrills" + icon_state = "soghun_longfrills_webbed" species_allowed = list("Unathi") - secondary_theme = "webbing" gender = NEUTER una_frills_webbed_short name = "Short Webbed Frills" - icon_state = "soghun_shortfrills" + icon_state = "soghun_shortfrills_webbed" + species_allowed = list("Unathi") + gender = NEUTER + + una_frills_webbed_aquatic + name = "Aquatic Frills" + icon_state = "soghun_aquaticfrills_webbed" species_allowed = list("Unathi") - secondary_theme = "webbing" gender = NEUTER @@ -1848,26 +1793,6 @@ species_allowed = list("Unathi") icon_state = "horns_ram" -/datum/sprite_accessory/head_accessory/outears_taj - name = "Tajaran Outer Ears" - species_allowed = list("Tajaran") - icon_state = "markings_face_outears_taj" - -/datum/sprite_accessory/head_accessory/inears_taj - name = "Tajaran Inner Ears" - species_allowed = list("Tajaran") - icon_state = "markings_face_inears_taj" - -/datum/sprite_accessory/head_accessory/muzzle_taj - name = "Tajaran Muzzle" - species_allowed = list("Tajaran") - icon_state = "markings_face_muzzle_taj" - -/datum/sprite_accessory/head_accessory/muzzle_and_inears_taj - name = "Tajaran Muzzle and Inner Ears" - species_allowed = list("Tajaran") - icon_state = "markings_face_muzzle_and_inears_taj" - /datum/sprite_accessory/head_accessory/vulp_earfluff icon = 'icons/mob/human_face.dmi' name = "Vulpkanin Earfluff" @@ -1922,12 +1847,6 @@ icon_state = "vulp_facial_swift" species_allowed = list("Vulpkanin") -/datum/sprite_accessory/head_accessory/vulp_nose - icon = 'icons/mob/body_accessory.dmi' - name = "Vulpkanin Nose" - species_allowed = list("Vulpkanin") - icon_state = "markings_face_nose_vulp" - /datum/sprite_accessory/head_accessory/taj_ears icon = 'icons/mob/human_face.dmi' name = "Tajaran Ears" @@ -1959,274 +1878,70 @@ /datum/sprite_accessory/body_markings icon = 'icons/mob/body_accessory.dmi' - species_allowed = list("Unathi", "Tajaran", "Vulpkanin", "Machine", "Vox") + species_allowed = list("Unathi", "Tajaran", "Vulpkanin", "Machine") icon_state = "accessory_none" - marking_location = "body" /datum/sprite_accessory/body_markings/none name = "None" species_allowed = list("Human", "Unathi", "Diona", "Grey", "Machine", "Tajaran", "Vulpkanin", "Slime People", "Skeleton", "Vox") icon_state = "accessory_none" +/datum/sprite_accessory/body_markings/stripe + name = "Stripe" + species_allowed = list("Unathi") + icon_state = "markings_stripe" + /datum/sprite_accessory/body_markings/tiger name = "Tiger Body" species_allowed = list("Unathi", "Tajaran", "Vulpkanin") icon_state = "markings_tiger" -/datum/sprite_accessory/body_markings/stripe_una - name = "Unathi Stripe" - species_allowed = list("Unathi") - icon_state = "markings_stripe_una" +/datum/sprite_accessory/body_markings/tigerhead + name = "Tiger Body and Head" + species_allowed = list("Unathi", "Tajaran", "Vulpkanin") + icon_state = "markings_tigerhead" -/datum/sprite_accessory/body_markings/belly_narrow_una - name = "Unathi Belly" - species_allowed = list("Unathi") - icon_state = "markings_belly_narrow_una" - -/datum/sprite_accessory/body_markings/banded_una - name = "Unathi Banded" - species_allowed = list("Unathi") - icon_state = "markings_banded_una" - -/datum/sprite_accessory/body_markings/points_una - name = "Unathi Points" - species_allowed = list("Unathi") - icon_state = "markings_points_una" - -/datum/sprite_accessory/body_markings/belly_flat_taj - name = "Tajaran Belly" +/datum/sprite_accessory/body_markings/tigerheadface_taj + name = "Tajaran Tiger Body, Head and Face" species_allowed = list("Tajaran") - icon_state = "markings_belly_flat_taj" + icon_state = "markings_tigerheadface_taj" -/datum/sprite_accessory/body_markings/belly_crest_taj - name = "Tajaran Chest Crest" - species_allowed = list("Tajaran") - icon_state = "markings_belly_crest_taj" - -/datum/sprite_accessory/body_markings/belly_full_taj - name = "Tajaran Belly 2" - species_allowed = list("Tajaran") - icon_state = "markings_belly_full_taj" - -/datum/sprite_accessory/body_markings/points_taj - name = "Tajaran Points" - species_allowed = list("Tajaran") - icon_state = "markings_points_taj" - -/datum/sprite_accessory/body_markings/patchy_taj - name = "Tajaran Patches" - species_allowed = list("Tajaran") - icon_state = "markings_patch_taj" - -/datum/sprite_accessory/body_markings/belly_fox_vulp - name = "Vulpkanin Belly" +/datum/sprite_accessory/body_markings/tigerheadface_vulp + name = "Vulpkanin Tiger Body, Head and Face" species_allowed = list("Vulpkanin") - icon_state = "markings_belly_fox_vulp" + icon_state = "markings_tigerheadface_vulp" -/datum/sprite_accessory/body_markings/belly_full_vulp - name = "Vulpkanin Belly 2" - species_allowed = list("Vulpkanin") - icon_state = "markings_belly_full_vulp" - -/datum/sprite_accessory/body_markings/belly_crest_vulp - name = "Vulpkanin Belly Crest" - species_allowed = list("Vulpkanin") - icon_state = "markings_belly_crest_vulp" - -/datum/sprite_accessory/body_markings/points_fade_vulp - name = "Vulpkanin Points" - species_allowed = list("Vulpkanin") - icon_state = "markings_points_fade_vulp" - -/datum/sprite_accessory/body_markings/points_fade_belly_vulp - name = "Vulpkanin Points and Belly" - species_allowed = list("Vulpkanin") - icon_state = "markings_points_fade_belly_vulp" - -/datum/sprite_accessory/body_markings/points_sharp_vulp - name = "Vulpkanin Points 2" - species_allowed = list("Vulpkanin") - icon_state = "markings_points_sharp_vulp" - -/datum/sprite_accessory/body_markings/head - marking_location = "head" - species_allowed = list() - -/datum/sprite_accessory/body_markings/head/tiger_head_taj - name = "Tajaran Tiger Head" - species_allowed = list("Tajaran") - icon_state = "markings_head_tiger_taj" - -/datum/sprite_accessory/body_markings/head/tiger_face_taj - name = "Tajaran Tiger Head and Face" - species_allowed = list("Tajaran") - icon_state = "markings_face_tiger_taj" - -/datum/sprite_accessory/body_markings/head/outears_taj - name = "Tajaran Outer Ears" - species_allowed = list("Tajaran") - icon_state = "markings_face_outears_taj" - -/datum/sprite_accessory/body_markings/head/inears_taj - name = "Tajaran Inner Ears" - species_allowed = list("Tajaran") - icon_state = "markings_face_inears_taj" - -/datum/sprite_accessory/body_markings/head/nose_taj - name = "Tajaran Nose" - species_allowed = list("Tajaran") - icon_state = "markings_face_nose_taj" - -/datum/sprite_accessory/body_markings/head/muzzle_taj - name = "Tajaran Muzzle" - species_allowed = list("Tajaran") - icon_state = "markings_face_muzzle_taj" - -/datum/sprite_accessory/body_markings/head/muzzle_and_inears_taj - name = "Tajaran Muzzle and Inner Ears" - species_allowed = list("Tajaran") - icon_state = "markings_face_muzzle_and_inears_taj" - -/datum/sprite_accessory/body_markings/head/muzzle_alt_taj //Companion marking for Tajaran Belly 2. - name = "Tajaran Muzzle 2" - species_allowed = list("Tajaran") - icon_state = "markings_face_full_taj" - -/datum/sprite_accessory/body_markings/head/points_taj //Companion marking for Tajaran Points. - name = "Tajaran Points Head" - species_allowed = list("Tajaran") - icon_state = "markings_face_points_taj" - -/datum/sprite_accessory/body_markings/head/patchy_taj //Companion marking for Tajaran Patches. - name = "Tajaran Patches Head" - species_allowed = list("Tajaran") - icon_state = "markings_face_patch_taj" - -/datum/sprite_accessory/body_markings/head/tiger_head_vulp - name = "Vulpkanin Tiger Head" - species_allowed = list("Vulpkanin") - icon_state = "markings_head_tiger_vulp" - -/datum/sprite_accessory/body_markings/head/tiger_face_vulp - name = "Vulpkanin Tiger Head and Face" - species_allowed = list("Vulpkanin") - icon_state = "markings_face_tiger_vulp" - -/datum/sprite_accessory/body_markings/head/nose_default_vulp - name = "Vulpkanin Nose" - species_allowed = list("Vulpkanin") - icon_state = "markings_face_nose_vulp" - -/datum/sprite_accessory/body_markings/head/muzzle_vulp //Companion marking for Vulpkanin Belly Alt.. - name = "Vulpkanin Muzzle" - species_allowed = list("Vulpkanin") - icon_state = "markings_face_full_vulp" - -/datum/sprite_accessory/body_markings/head/muzzle_ears_vulp //Companion marking for Vulpkanin Belly Alt.. - name = "Vulpkanin Muzzle and Ears" - species_allowed = list("Vulpkanin") - icon_state = "markings_face_full_ears_vulp" - -/datum/sprite_accessory/body_markings/head/points_fade_vulp //Companion marking for Vulpkanin Points Fade. - name = "Vulpkanin Points Head" - species_allowed = list("Vulpkanin") - icon_state = "markings_face_points_fade_vulp" - -/datum/sprite_accessory/body_markings/head/points_sharp_vulp //Companion marking for Vulpkanin Points Sharp. - name = "Vulpkanin Points Head 2" - species_allowed = list("Vulpkanin") - icon_state = "markings_face_points_sharp_vulp" - -/datum/sprite_accessory/body_markings/head/tiger_head_una - name = "Unathi Tiger Head" +/datum/sprite_accessory/body_markings/tigerheadface_una + name = "Unathi Tiger Body, Head and Face" species_allowed = list("Unathi") - icon_state = "markings_head_tiger_una" + icon_state = "markings_tigerheadface_una" -/datum/sprite_accessory/body_markings/head/tiger_face_una - name = "Unathi Tiger Head and Face" - species_allowed = list("Unathi") - icon_state = "markings_face_tiger_una" - -/datum/sprite_accessory/body_markings/head/tiger_face_una_sharp - name = "Unathi Sharp Tiger Head and Face" - species_allowed = list("Unathi") - icon_state = "markings_face_tiger_una_sharp" - heads_allowed = list("Unathi Sharp Snout") - -/datum/sprite_accessory/body_markings/head/snout_una_round - name = "Unathi Round Snout" - species_allowed = list("Unathi") - icon_state = "markings_face_snout_una_round" - -/datum/sprite_accessory/body_markings/head/snout_lower_una_round - name = "Unathi Lower Round Snout" - species_allowed = list("Unathi") - icon_state = "markings_face_snout_lower_una" - -/datum/sprite_accessory/body_markings/head/snout_una_sharp - name = "Unathi Sharp Snout" - species_allowed = list("Unathi") - icon_state = "markings_face_snout_una_sharp" - heads_allowed = list("Unathi Sharp Snout") - -/datum/sprite_accessory/body_markings/head/banded_una //Companion marking for Unathi Banded. - name = "Unathi Banded Head" - species_allowed = list("Unathi") - icon_state = "markings_face_banded_una" - -/datum/sprite_accessory/body_markings/head/banded_una_sharp //Companion marking for Unathi Banded. - name = "Unathi Sharp Banded Head" - species_allowed = list("Unathi") - icon_state = "markings_face_banded_una" - heads_allowed = list("Unathi Sharp Snout") - -/datum/sprite_accessory/body_markings/head/snout_narrow_una //Companion marking for Unathi Narrow Belly. - name = "Unathi Snout 2" - species_allowed = list("Unathi") - icon_state = "markings_face_narrow_una" - -/datum/sprite_accessory/body_markings/head/snout_narrow_una_sharp //Companion marking for Unathi Narrow Belly. - name = "Unathi Sharp Snout 2" - species_allowed = list("Unathi") - icon_state = "markings_face_narrow_una_sharp" - heads_allowed = list("Unathi Sharp Snout") - -/datum/sprite_accessory/body_markings/head/points_una //Companion marking for Unathi Points. - name = "Unathi Points Head" - species_allowed = list("Unathi") - icon_state = "markings_face_points_una" - -/datum/sprite_accessory/body_markings/head/points_una_sharp //Companion marking for Unathi Points. - name = "Unathi Sharp Points Head" - species_allowed = list("Unathi") - icon_state = "markings_face_points_una" - heads_allowed = list("Unathi Sharp Snout") - -/datum/sprite_accessory/body_markings/head/optics +/datum/sprite_accessory/body_markings/optics name = "Humanoid Optics" species_allowed = list("Machine") icon_state = "optics" models_allowed = list("Bishop Cybernetics", "Hesphiastos Industries", "Ward-Takahashi", "Xion Manufacturing Group", "Zeng-Hu Pharmaceuticals") //Should be the same as the manufacturing company of the limb in robolimbs.dm + marking_location = "head" -/datum/sprite_accessory/body_markings/head/optics/bishop_alt +/datum/sprite_accessory/body_markings/optics/bishop_alt name = "Bishop Alt. Optics" species_allowed = list("Machine") icon_state = "bishop_alt_optics" models_allowed = list("Bishop Cybernetics alt.") -/datum/sprite_accessory/body_markings/head/optics/morpheus_alt +/datum/sprite_accessory/body_markings/optics/morpheus_alt name = "Morpheus Alt. Optics" species_allowed = list("Machine") icon_state = "morpheus_alt_optics" models_allowed = list("Morpheus Cyberkinetics alt.") -/datum/sprite_accessory/body_markings/head/optics/wardtakahashi_alt +/datum/sprite_accessory/body_markings/optics/wardtakahashi_alt name = "Ward-Takahashi Alt. Optics" species_allowed = list("Machine") icon_state = "wardtakahashi_alt_optics" models_allowed = list("Ward-Takahashi alt.") -/datum/sprite_accessory/body_markings/head/optics/xion_alt +/datum/sprite_accessory/body_markings/optics/xion_alt name = "Xion Alt. Optics" species_allowed = list("Machine") icon_state = "xion_alt_optics" @@ -2239,115 +1954,4 @@ /datum/sprite_accessory/body_markings/tattoo/elliot name = "Elliot Circuit Tattoo" - icon_state = "campbell_tattoo" - -/datum/sprite_accessory/body_markings/tattoo/heart - name = "Heart Tattoo" - species_allowed = list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell") - icon_state = "markings_tattoo_heart" - -/datum/sprite_accessory/body_markings/tattoo/heart_vox - name = "Vox Heart Tattoo" - species_allowed = list("Vox") - icon_state = "markings_tattoo_heart_vox" - -/datum/sprite_accessory/body_markings/tattoo/hive - name = "Hive Tattoo" - species_allowed = list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell") - icon_state = "markings_tattoo_hive" - -/datum/sprite_accessory/body_markings/tattoo/hive_vox - name = "Vox Hive Tattoo" - species_allowed = list("Vox") - icon_state = "markings_tattoo_hive_vox" - -/datum/sprite_accessory/body_markings/tattoo/nightling - name = "Nightling Tattoo" - species_allowed = list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell") - icon_state = "markings_tattoo_nightling" - -/datum/sprite_accessory/body_markings/tattoo/nightling_vox - name = "Vox Nightling Tattoo" - species_allowed = list("Vox") - icon_state = "markings_tattoo_nightling_vox" - -/datum/sprite_accessory/body_markings/tail - name = "Tail Markings" - species_allowed = list() - icon_state = "accessory_none" - marking_location = "tail" - tails_allowed = null - -/datum/sprite_accessory/body_markings/tail/vox_band - name = "Vox Tail Band" - species_allowed = list("Vox") - icon_state = "markings_voxtail_band" - -/datum/sprite_accessory/body_markings/tail/vox_tip - name = "Vox Tail Tip" - species_allowed = list("Vox") - icon_state = "markings_voxtail_tip" - -/datum/sprite_accessory/body_markings/tail/vox_stripe - name = "Vox Tail Stripe" - species_allowed = list("Vox") - icon_state = "markings_voxtail_stripe" - -/datum/sprite_accessory/body_markings/tail/vulp_default_tip - name = "Vulpkanin Default Tail Tip" - species_allowed = list("Vulpkanin") - icon_state = "markings_vulptail_tip" - -/datum/sprite_accessory/body_markings/tail/vulp_default_fade - name = "Vulpkanin Default Tail Fade" - species_allowed = list("Vulpkanin") - icon_state = "markings_vulptail_fade" - -/datum/sprite_accessory/body_markings/tail/vulp_bushy_fluff - name = "Vulpkanin Bushy Tail Fluff" - species_allowed = list("Vulpkanin") - tails_allowed = list("Vulpkanin Alt 1 (Bushy)") - icon_state = "markings_vulptail2_fluff" - -/datum/sprite_accessory/body_markings/tail/vulp_short_tip - name = "Vulpkanin Short Tail Tip" - species_allowed = list("Vulpkanin") - tails_allowed = list("Vulpkanin Alt 4 (Short)") - icon_state = "markings_vulptail5_tip" - -/datum/sprite_accessory/body_markings/tail/vulp_hybrid_tip - name = "Vulpkanin Bushy Straight Tail Tip" - species_allowed = list("Vulpkanin") - tails_allowed = list("Vulpkanin Alt 5 (Straight Bushy)") - icon_state = "markings_vulptail6_tip" - -/datum/sprite_accessory/body_markings/tail/vulp_hybrid_fade - name = "Vulpkanin Bushy Straight Tail Fade" - species_allowed = list("Vulpkanin") - tails_allowed = list("Vulpkanin Alt 5 (Straight Bushy)") - icon_state = "markings_vulptail6_fade" - -/datum/sprite_accessory/body_markings/tail/vulp_hybrid_silverf - name = "Vulpkanin Bushy Straight Tail Black Fade White Tip" - species_allowed = list("Vulpkanin") - tails_allowed = list("Vulpkanin Alt 5 (Straight Bushy)") - icon_state = "markings_vulptail6_silverf" - -/* ALT HEADS */ - -/datum/sprite_accessory/alt_heads - name = "Alternate Head" - icon = null - icon_state = null - species_allowed = null - -/datum/sprite_accessory/alt_heads/none - name = "None" - icon = null - icon_state = null - species_allowed = null - -/datum/sprite_accessory/alt_heads/una_sharp_snout - name = "Unathi Sharp Snout" - species_allowed = list("Unathi") - icon_state = "head_sharp" + icon_state = "campbell_tattoo" \ No newline at end of file diff --git a/code/modules/nano/modules/human_appearance.dm b/code/modules/nano/modules/human_appearance.dm index 7771764c5a1..ee289cfec9b 100644 --- a/code/modules/nano/modules/human_appearance.dm +++ b/code/modules/nano/modules/human_appearance.dm @@ -7,11 +7,8 @@ var/list/valid_hairstyles = list() var/list/valid_facial_hairstyles = list() var/list/valid_head_accessories = list() - var/list/valid_head_marking_styles = list() - var/list/valid_body_marking_styles = list() - var/list/valid_tail_marking_styles = list() + var/list/valid_marking_styles = list() var/list/valid_body_accessories = list() - var/list/valid_alt_head_styles = list() var/check_whitelist var/list/whitelist @@ -49,7 +46,7 @@ else if(owner.species.bodyflags & HAS_ICON_SKIN_TONE) var/const/MAX_LINE_ENTRIES = 4 var/prompt = "Choose your character's skin tone: 1-[owner.species.icon_skin_tones.len]\n(" - for(var/i = 1 to owner.species.icon_skin_tones.len) + for(var/i = 1; i <= owner.species.icon_skin_tones.len; i++) if(i > MAX_LINE_ENTRIES && !((i - 1) % MAX_LINE_ENTRIES)) prompt += "\n" prompt += "[i] = [owner.species.icon_skin_tones[i]]" @@ -88,16 +85,6 @@ if(owner.change_hair_color(r_hair, g_hair, b_hair)) update_dna() return 1 - if(href_list["secondary_hair_color"]) - 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)) - if(owner.change_hair_color(r_hair_sec, g_hair_sec, b_hair_sec, 1)) - update_dna() - return 1 if(href_list["facial_hair"]) if(can_change(APPEARANCE_FACIAL_HAIR) && (href_list["facial_hair"] in valid_facial_hairstyles)) if(owner.change_facial_hair(href_list["facial_hair"])) @@ -113,16 +100,6 @@ if(owner.change_facial_hair_color(r_facial, g_facial, b_facial)) update_dna() return 1 - if(href_list["secondary_facial_hair_color"]) - 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)) - if(owner.change_facial_hair_color(r_facial_sec, g_facial_sec, b_facial_sec, 1)) - update_dna() - return 1 if(href_list["eye_color"]) 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 @@ -148,46 +125,19 @@ if(owner.change_head_accessory_color(r_headacc, g_headacc, b_headacc)) update_dna() return 1 - if(href_list["head_marking"]) - if(can_change_markings("head") && (href_list["head_marking"] in valid_head_marking_styles)) - if(owner.change_markings(href_list["head_marking"], "head")) + if(href_list["marking"]) + if(can_change_markings() && (href_list["marking"] in valid_marking_styles)) + if(owner.change_markings(href_list["marking"])) update_dna() 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 + if(href_list["marking_color"]) + if(can_change_markings()) + var/new_markings = input("Please select marking color.", "Marking Color", rgb(owner.r_markings, owner.g_markings, owner.b_markings)) as color|null if(new_markings && can_still_topic(state)) - if(owner.change_marking_color(new_markings, "head")) - update_dna() - return 1 - if(href_list["body_marking"]) - if(can_change_markings("body") && (href_list["body_marking"] in valid_body_marking_styles)) - if(owner.change_markings(href_list["body_marking"], "body")) - update_dna() - 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 - if(new_markings && can_still_topic(state)) - if(owner.change_marking_color(new_markings, "body")) - update_dna() - return 1 - if(href_list["tail_marking"]) - if(can_change_markings("tail") && (href_list["tail_marking"] in valid_tail_marking_styles)) - if(owner.change_markings(href_list["tail_marking"], "tail")) - update_dna() - 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 - if(new_markings && can_still_topic(state)) - if(owner.change_marking_color(new_markings, "tail")) + var/r_markings = hex2num(copytext(new_markings, 2, 4)) + var/g_markings = hex2num(copytext(new_markings, 4, 6)) + var/b_markings = hex2num(copytext(new_markings, 6, 8)) + if(owner.change_marking_color(r_markings, g_markings, b_markings)) update_dna() return 1 if(href_list["body_accessory"]) @@ -195,11 +145,6 @@ if(owner.change_body_accessory(href_list["body_accessory"])) update_dna() return 1 - if(href_list["alt_head"]) - if(can_change_alt_head() && (href_list["alt_head"] in valid_alt_head_styles)) - if(owner.change_alt_head(href_list["alt_head"])) - update_dna() - return 1 return 0 @@ -244,35 +189,13 @@ data["facial_hair_styles"] = facial_hair_styles data["facial_hair_style"] = head_organ.f_style - 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/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) - data["head_marking_styles"] = head_marking_styles - data["head_marking_style"] = m_style - - 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/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) - data["body_marking_styles"] = body_marking_styles - data["body_marking_style"] = m_style - - 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/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) - data["tail_marking_styles"] = tail_marking_styles - data["tail_marking_style"] = m_style + data["change_markings"] = can_change_markings() + if(data["change_markings"]) + var/marking_styles[0] + for(var/marking_style in valid_marking_styles) + marking_styles[++marking_styles.len] = list("markingstyle" = marking_style) + data["marking_styles"] = marking_styles + data["marking_style"] = owner.m_style data["change_body_accessory"] = can_change_body_accessory() if(data["change_body_accessory"]) @@ -285,22 +208,10 @@ BA = owner.body_accessory.name data["body_accessory_style"] = BA - data["change_alt_head"] = can_change_alt_head() - if(data["change_alt_head"]) - var/alt_head_styles[0] - for(var/alt_head_style in valid_alt_head_styles) - alt_head_styles[++alt_head_styles.len] = list("altheadstyle" = alt_head_style) - data["alt_head_styles"] = alt_head_styles - data["alt_head_style"] = head_organ.alt_head - data["change_head_accessory_color"] = can_change_head_accessory() data["change_hair_color"] = can_change(APPEARANCE_HAIR_COLOR) - data["change_secondary_hair_color"] = can_change(APPEARANCE_SECONDARY_HAIR_COLOR) data["change_facial_hair_color"] = can_change(APPEARANCE_FACIAL_HAIR_COLOR) - data["change_secondary_facial_hair_color"] = can_change(APPEARANCE_SECONDARY_FACIAL_HAIR_COLOR) - data["change_head_marking_color"] = can_change_markings("head") - data["change_body_marking_color"] = can_change_markings("body") - data["change_tail_marking_color"] = can_change_markings("tail") + data["change_marking_color"] = can_change_markings() ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "appearance_changer.tmpl", "[src]", 800, 450, state = state) @@ -324,36 +235,19 @@ /datum/nano_module/appearance_changer/proc/can_change_head_accessory() return owner && (flags & APPEARANCE_HEAD_ACCESSORY) && (head_organ.species.bodyflags & HAS_HEAD_ACCESSORY) -/datum/nano_module/appearance_changer/proc/can_change_markings(var/location = "body") - var/marking_flag = HAS_BODY_MARKINGS - var/body_flags = owner.species.bodyflags - if(location == "head") - var/obj/item/organ/external/head/H = owner.get_organ("head") - body_flags = H.species.bodyflags - marking_flag = HAS_HEAD_MARKINGS - if(location == "body") - marking_flag = HAS_BODY_MARKINGS - if(location == "tail") - marking_flag = HAS_TAIL_MARKINGS - - return owner && (flags & APPEARANCE_MARKINGS) && (body_flags & marking_flag) +/datum/nano_module/appearance_changer/proc/can_change_markings() + return owner && (flags & APPEARANCE_MARKINGS) && (owner.species.bodyflags & HAS_MARKINGS) /datum/nano_module/appearance_changer/proc/can_change_body_accessory() return owner && (flags & APPEARANCE_BODY_ACCESSORY) && (owner.species.bodyflags & HAS_TAIL) -/datum/nano_module/appearance_changer/proc/can_change_alt_head() - return owner && (flags & APPEARANCE_ALT_HEAD) && (owner.species.bodyflags & HAS_ALT_HEADS) - /datum/nano_module/appearance_changer/proc/cut_and_generate_data() // Making the assumption that the available species remain constant valid_hairstyles.Cut() valid_facial_hairstyles.Cut() valid_head_accessories.Cut() - valid_head_marking_styles.Cut() - valid_body_marking_styles.Cut() - valid_tail_marking_styles.Cut() + valid_marking_styles.Cut() valid_body_accessories.Cut() - valid_alt_head_styles.Cut() generate_data() /datum/nano_module/appearance_changer/proc/generate_data() @@ -366,13 +260,7 @@ valid_facial_hairstyles = owner.generate_valid_facial_hairstyles() if(!valid_head_accessories.len) valid_head_accessories = owner.generate_valid_head_accessories() - if(!valid_head_marking_styles.len) - valid_head_marking_styles = owner.generate_valid_markings("head") - if(!valid_body_marking_styles.len) - valid_body_marking_styles = owner.generate_valid_markings("body") - if(!valid_tail_marking_styles.len) - valid_tail_marking_styles = owner.generate_valid_markings("tail") + if(!valid_marking_styles.len) + valid_marking_styles = owner.generate_valid_markings() if(!valid_body_accessories.len) valid_body_accessories = owner.generate_valid_body_accessories() - if(!valid_alt_head_styles.len) - valid_alt_head_styles = owner.generate_valid_alt_heads() diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index 0de37b1a652..ad0a1973b8f 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) + target.m_style = "" 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_external.dm b/code/modules/surgery/organs/organ_external.dm index 9e1e1d70b79..1c3f05f5816 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -856,11 +856,11 @@ Note that amputating the affected organ does in fact remove the infection from t /obj/item/organ/external/proc/mutate() src.status |= ORGAN_MUTATED - if(owner) owner.update_body(0, 1) //Forces all bodyparts to update in order to correctly render the deformed sprite. + if(owner) owner.update_body() /obj/item/organ/external/proc/unmutate() src.status &= ~ORGAN_MUTATED - if(owner) owner.update_body(0, 1) //Forces all bodyparts to update in order to correctly return them to normal. + if(owner) owner.update_body() /obj/item/organ/external/proc/get_damage() //returns total damage return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health? diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index 2f0eb84c1be..49777aa4a5c 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -73,17 +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"] - 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) - overlays |= h_marking_s + if(owner.m_style) + var/datum/sprite_accessory/marking_style = marking_styles_list[owner.m_style] + if(marking_style && marking_style.species_allowed && (species.name in marking_style.species_allowed) && marking_style.marking_location == "head") + var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s") + if(marking_style.do_colouration) + markings_s.Blend(rgb(owner.r_markings, owner.g_markings, owner.b_markings), ICON_ADD) + overlays |= markings_s if(H.ha_style) var/datum/sprite_accessory/head_accessory_style = head_accessory_styles_list[H.ha_style] @@ -139,10 +135,6 @@ var/global/list/limb_icon_cache = list() else if(status & ORGAN_ROBOT) mob_icon = new /icon('icons/mob/human_races/robotic.dmi', "[icon_name][gender ? "_[gender]" : ""]") else - if(limb_name == "head") - var/obj/item/organ/external/head/head_organ = src - head_organ.handle_alt_icon() - if(status & ORGAN_MUTATED) mob_icon = new /icon(species.deform, "[icon_name][gender ? "_[gender]" : ""]") else diff --git a/code/modules/surgery/organs/subtypes/standard.dm b/code/modules/surgery/organs/subtypes/standard.dm index 85d698ea98b..1c6240318fe 100644 --- a/code/modules/surgery/organs/subtypes/standard.dm +++ b/code/modules/surgery/organs/subtypes/standard.dm @@ -140,15 +140,11 @@ gendered_icon = 1 encased = "skull" var/can_intake_reagents = 1 - var/alt_head = "None" //Hair colour and style var/r_hair = 0 var/g_hair = 0 var/b_hair = 0 - var/r_hair_sec = 0 - var/g_hair_sec = 0 - var/b_hair_sec = 0 var/h_style = "Bald" //Head accessory colour and style @@ -161,9 +157,6 @@ var/r_facial = 0 var/g_facial = 0 var/b_facial = 0 - var/r_facial_sec = 0 - var/g_facial_sec = 0 - var/b_facial_sec = 0 var/f_style = "Shaved" /obj/item/organ/external/head/remove() @@ -200,14 +193,3 @@ disfigure("brute") if(burn_dam > 40) disfigure("burn") - -/obj/item/organ/external/head/proc/handle_alt_icon() - if(alt_head && alt_heads_list[alt_head]) - var/datum/sprite_accessory/alt_heads/alternate_head = alt_heads_list[alt_head] - if(alternate_head.icon_state) - icon_name = alternate_head.icon_state - else //If alternate_head.icon_state doesn't exist, that means alternate_head is "None", so default icon_name back to "head". - icon_name = initial(icon_name) - else //If alt_head is null, set it to "None" and default icon_name for sanity. - alt_head = initial(alt_head) - icon_name = initial(icon_name) diff --git a/icons/effects/species.dmi b/icons/effects/species.dmi index 87c047f397a..ee3da07c3c5 100644 Binary files a/icons/effects/species.dmi and b/icons/effects/species.dmi differ diff --git a/icons/mob/body_accessory.dmi b/icons/mob/body_accessory.dmi index facdd260fb3..c45bd957a1a 100644 Binary files a/icons/mob/body_accessory.dmi and b/icons/mob/body_accessory.dmi differ diff --git a/icons/mob/human_face.dmi b/icons/mob/human_face.dmi index 410a187e8bf..79df46605a2 100644 Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.dmi differ diff --git a/icons/mob/human_races/r_def_lizard.dmi b/icons/mob/human_races/r_def_lizard.dmi index e1c40712b23..3926ca17092 100644 Binary files a/icons/mob/human_races/r_def_lizard.dmi and b/icons/mob/human_races/r_def_lizard.dmi differ diff --git a/icons/mob/human_races/r_def_tajaran.dmi b/icons/mob/human_races/r_def_tajaran.dmi index e62f4228fc6..1e7da69c495 100644 Binary files a/icons/mob/human_races/r_def_tajaran.dmi and b/icons/mob/human_races/r_def_tajaran.dmi differ diff --git a/icons/mob/human_races/r_human.dmi b/icons/mob/human_races/r_human.dmi index 1b2ae2ccc2c..0aa7295b8d3 100644 Binary files a/icons/mob/human_races/r_human.dmi and b/icons/mob/human_races/r_human.dmi differ diff --git a/icons/mob/human_races/r_lizard.dmi b/icons/mob/human_races/r_lizard.dmi index d60ae4979df..457e50b204e 100644 Binary files a/icons/mob/human_races/r_lizard.dmi and b/icons/mob/human_races/r_lizard.dmi differ diff --git a/icons/mob/human_races/r_skrell.dmi b/icons/mob/human_races/r_skrell.dmi index 586714c7da8..f1c4966dc51 100644 Binary files a/icons/mob/human_races/r_skrell.dmi and b/icons/mob/human_races/r_skrell.dmi differ diff --git a/icons/mob/human_races/r_tajaran.dmi b/icons/mob/human_races/r_tajaran.dmi index 3f45032951d..c287ef822f3 100644 Binary files a/icons/mob/human_races/r_tajaran.dmi and b/icons/mob/human_races/r_tajaran.dmi differ diff --git a/icons/mob/human_races/r_vulpkanin.dmi b/icons/mob/human_races/r_vulpkanin.dmi index 3bcdb3539b7..0f1b6956c10 100644 Binary files a/icons/mob/human_races/r_vulpkanin.dmi and b/icons/mob/human_races/r_vulpkanin.dmi differ diff --git a/nano/templates/appearance_changer.tmpl b/nano/templates/appearance_changer.tmpl index f63879aaf7e..886076f21d2 100644 --- a/nano/templates/appearance_changer.tmpl +++ b/nano/templates/appearance_changer.tmpl @@ -23,7 +23,7 @@ {{/if}} -{{if data.change_eye_color || data.change_skin_tone || data.change_skin_color || data.change_head_accessory_color || data.change_hair_color || data.change_facial_hair_color || data.change_head_marking_color || data.change_body_marking_color || data.change_tail_marking_color}} +{{if data.change_eye_color || data.change_skin_tone || data.change_skin_color || data.change_head_accessory_color || data.change_hair_color || data.change_facial_hair_color || data.change_marking_color}}
Colors: @@ -43,24 +43,12 @@ {{/if}} {{if data.change_hair_color}} {{:helper.link('Change hair color', null, { 'hair_color' : 1})}} - {{/if}} - {{if data.change_secondary_hair_color}} - {{:helper.link('Change secondary hair color', null, { 'secondary_hair_color' : 1})}} {{/if}} {{if data.change_facial_hair_color}} {{:helper.link('Change facial hair color', null, { 'facial_hair_color' : 1})}} {{/if}} - {{if data.change_secondary_facial_hair_color}} - {{:helper.link('Change secondary facial hair color', null, { 'secondary_facial_hair_color' : 1})}} - {{/if}} - {{if data.change_head_marking_color}} - {{:helper.link('Change head marking color', null, { 'head_marking_color' : 1})}} - {{/if}} - {{if data.change_body_marking_color}} - {{:helper.link('Change body marking color', null, { 'body_marking_color' : 1})}} - {{/if}} - {{if data.change_tail_marking_color}} - {{:helper.link('Change tail marking color', null, { 'tail_marking_color' : 1})}} + {{if data.change_marking_color}} + {{:helper.link('Change marking color', null, { 'marking_color' : 1})}} {{/if}}
@@ -105,40 +93,14 @@ {{/if}} -{{if data.change_head_markings}} +{{if data.change_markings}}
- Head Marking styles: + Marking styles:
- {{for data.head_marking_styles}} - {{:helper.link(value.headmarkingstyle, null, { 'head_marking' : value.headmarkingstyle}, null, data.head_marking_style == value.headmarkingstyle ? 'selected' : null)}} - {{/for}} -
-
-{{/if}} - -{{if data.change_body_markings}} -
-
- Body Marking styles: -
-
- {{for data.body_marking_styles}} - {{:helper.link(value.bodymarkingstyle, null, { 'body_marking' : value.bodymarkingstyle}, null, data.body_marking_style == value.bodymarkingstyle ? 'selected' : null)}} - {{/for}} -
-
-{{/if}} - -{{if data.change_tail_markings}} -
-
- Tail Marking styles: -
-
- {{for data.tail_marking_styles}} - {{:helper.link(value.tailmarkingstyle, null, { 'tail_marking' : value.tailmarkingstyle}, null, data.tail_marking_style == value.tailmarkingstyle ? 'selected' : null)}} + {{for data.marking_styles}} + {{:helper.link(value.markingstyle, null, { 'marking' : value.markingstyle}, null, data.marking_style == value.markingstyle ? 'selected' : null)}} {{/for}}
@@ -156,16 +118,3 @@ {{/if}} - -{{if data.change_alt_head}} -
-
- Alternate Heads: -
-
- {{for data.alt_head_styles}} - {{:helper.link(value.altheadstyle, null, { 'alt_head' : value.altheadstyle}, null, data.alt_head_style == value.altheadstyle ? 'selected' : null)}} - {{/for}} -
-
-{{/if}}