diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 20930f1cdb8..60ec7275f84 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -58,11 +58,13 @@ #define FEET_CLAWS 1 #define FEET_PADDED 2 #define FEET_NOSLIP 4 -#define HAS_TAIL 8 -#define HAS_SKIN_TONE 16 -#define HAS_SKIN_COLOR 32 -#define TAIL_WAGGING 64 -#define NO_EYES 128 +#define HAS_HORNS 8 +#define HAS_TAIL 16 +#define HAS_SKIN_TONE 32 +#define HAS_SKIN_COLOR 64 +#define HAS_MARKINGS 128 +#define TAIL_WAGGING 256 +#define NO_EYES 512 //Species Diet Flags #define DIET_CARN 1 diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 185d02d69d6..b1bce2ab2f2 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -4,6 +4,8 @@ ////////////////////////// /proc/makeDatumRefLists() + //markings + init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, marking_styles_list) //horns init_sprite_accessory_subtypes(/datum/sprite_accessory/horns, horn_styles_list) //hair diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index 4887c4d12f7..115bed4d522 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -1,6 +1,8 @@ //Preferences stuff //Hornstyles var/global/list/horn_styles_list = list() //stores /datum/sprite_accessory/horns indexed by name + //Marking styles +var/global/list/marking_styles_list = list() //stores /datum/sprite_accessory/horns indexed by name //Hairstyles var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name var/global/list/hair_styles_male_list = list() diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 0dd408a0028..f1858339c50 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -180,13 +180,21 @@ proc/get_id_photo(var/mob/living/carbon/human/H) eyes_s.Blend(facial_s, ICON_OVERLAY) //Horns - if(H.species && H.species.name == "Unathi") + if(H.species.bodyflags & HAS_HORNS) var/datum/sprite_accessory/horns = horn_styles_list[H.horns] if(horns) var/icon/horns_s = new/icon("icon" = horns.icon, "icon_state" = "[horns.icon_state]_s") horns_s.Blend(rgb(H.r_skin, H.g_skin, H.b_skin), ICON_ADD) eyes_s.Blend(horns_s, ICON_OVERLAY) + //Horns + if(H.species.bodyflags & HAS_MARKINGS) + var/datum/sprite_accessory/marking_style = marking_styles_list[H.m_style] + if(marking_style) + 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) + eyes_s.Blend(markings_s, ICON_OVERLAY) + preview_icon.Blend(eyes_s, ICON_OVERLAY) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index f907ca9837d..57e56808de6 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -110,8 +110,12 @@ datum/preferences var/undershirt = "Nude" //undershirt type var/socks = "Nude" //socks type var/backbag = 2 //backpack type - var/h_style = "Bald" //Hair type var/horns = "None" //Horn style + 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 @@ -354,10 +358,14 @@ datum/preferences dat += "[TextPreview(flavor_text)]...
" dat += "
" - if(species == "Unathi") + if(species == "Unathi") //Species that have horns. dat += "
Horns
" dat += "Style: [horns]
" + dat += "
Body Markings
" + dat += "Change Color
__
" + dat += "
Style: [m_style]
" + var/hairname = "Hair" if(species == "Machine") hairname = "Frame Color" @@ -374,7 +382,7 @@ datum/preferences if((species in list("Unathi", "Tajaran", "Skrell", "Slime People", "Vulpkanin", "Machine")) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) //admins can always fuck with this, because they are admins dat += "
Body Color
" - dat += "Change Color
__
" + dat += "Change Color
__

" if(body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) dat += "
Body Accessory
" @@ -1206,6 +1214,28 @@ datum/preferences if(new_horn_style) horns = new_horn_style + if("markings") + if(species == "Unathi") + var/input = "Choose the colour of your your character's body 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)) + + if("m_style") + var/list/valid_markings = list() + for(var/markingstyle in marking_styles_list) + var/datum/sprite_accessory/M = marking_styles_list[markingstyle] + if( !(species in M.species_allowed)) + continue + + valid_markings[markingstyle] = marking_styles_list[markingstyle] + + var/new_marking_style = input(user, "Choose the style of your character's body markings:", "Character Preference") as null|anything in valid_markings + if(new_marking_style) + m_style = new_marking_style + if("body_accessory") var/list/possible_body_accessories = list() if(check_rights(R_ADMIN, 1, user)) @@ -1625,8 +1655,13 @@ datum/preferences character.undershirt = undershirt character.socks = socks - if(character.species.name == "Unathi") + if(character.species.bodyflags & HAS_HORNS) character.horns = horns + 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/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 8d74bbb3cbd..b0f6524b085 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -124,6 +124,9 @@ S["spawnpoint"] >> spawnpoint //colors to be consolidated into hex strings (requires some work with dna code) + S["markings_red"] >> r_markings + S["markings_green"] >> g_markings + S["markings_blue"] >> b_markings S["hair_red"] >> r_hair S["hair_green"] >> g_hair S["hair_blue"] >> b_hair @@ -135,6 +138,7 @@ S["skin_green"] >> g_skin S["skin_blue"] >> b_skin S["horn_style_name"] >> horns + S["marking_style_name"] >> m_style S["hair_style_name"] >> h_style S["facial_style_name"] >> f_style S["eyes_red"] >> r_eyes @@ -188,6 +192,9 @@ be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name)) gender = sanitize_gender(gender) age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age)) + 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_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)) @@ -199,6 +206,7 @@ g_skin = sanitize_integer(g_skin, 0, 255, initial(g_skin)) b_skin = sanitize_integer(b_skin, 0, 255, initial(b_skin)) horns = sanitize_inlist(horns, horn_styles_list, initial(horns)) + m_style = sanitize_inlist(m_style, marking_styles_list, initial(m_style)) 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)) r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes)) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index f2592a653c3..a75b1ab7bb5 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -2,6 +2,12 @@ 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/r_markings = 0 + var/g_markings = 0 + var/b_markings = 0 + var/m_style = "None" + //Hair colour and style var/r_hair = 0 var/g_hair = 0 diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index 1e85a1e2e52..ae1792be965 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -40,7 +40,7 @@ flags = HAS_LIPS clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = FEET_CLAWS | HAS_TAIL | HAS_SKIN_COLOR | TAIL_WAGGING + bodyflags = FEET_CLAWS | HAS_TAIL | HAS_HORNS | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING dietflags = DIET_CARN cold_level_1 = 280 //Default 260 - Lower is better diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 16ec5ace8ad..e40c148082f 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -106,31 +106,32 @@ Please contact me on #coderbus IRC. ~Carn x //Human Overlays Indexes///////// #define MUTANTRACE_LAYER 1 -#define MUTATIONS_LAYER 2 -#define DAMAGE_LAYER 3 -#define UNIFORM_LAYER 4 -#define ID_LAYER 5 -#define SHOES_LAYER 6 -#define GLOVES_LAYER 7 -#define EARS_LAYER 8 -#define SUIT_LAYER 9 -#define GLASSES_LAYER 10 -#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt? -#define TAIL_LAYER 12 //bs12 specific. this hack is probably gonna come back to haunt me -#define SUIT_STORE_LAYER 13 -#define BACK_LAYER 14 -#define HAIR_LAYER 15 //TODO: make part of head layer? -#define HORN_LAYER 16 -#define FACEMASK_LAYER 17 -#define HEAD_LAYER 18 -#define COLLAR_LAYER 19 -#define HANDCUFF_LAYER 20 -#define LEGCUFF_LAYER 21 -#define L_HAND_LAYER 22 -#define R_HAND_LAYER 23 -#define TARGETED_LAYER 24 //BS12: Layer for the target overlay from weapon targeting system -#define FIRE_LAYER 25 //If you're on fire -#define TOTAL_LAYERS 25 +#define MARKINGS_LAYER 2 +#define MUTATIONS_LAYER 3 +#define DAMAGE_LAYER 4 +#define UNIFORM_LAYER 5 +#define ID_LAYER 6 +#define SHOES_LAYER 7 +#define GLOVES_LAYER 8 +#define EARS_LAYER 9 +#define SUIT_LAYER 10 +#define GLASSES_LAYER 11 +#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt? +#define TAIL_LAYER 13 //bs12 specific. this hack is probably gonna come back to haunt me +#define SUIT_STORE_LAYER 14 +#define BACK_LAYER 15 +#define HAIR_LAYER 16 //TODO: make part of head layer? +#define HORN_LAYER 17 +#define FACEMASK_LAYER 18 +#define HEAD_LAYER 19 +#define COLLAR_LAYER 20 +#define HANDCUFF_LAYER 21 +#define LEGCUFF_LAYER 22 +#define L_HAND_LAYER 23 +#define R_HAND_LAYER 24 +#define TARGETED_LAYER 25 //BS12: Layer for the target overlay from weapon targeting system +#define FIRE_LAYER 26 //If you're on fire +#define TOTAL_LAYERS 26 @@ -353,8 +354,39 @@ var/global/list/damage_icon_parts = list() update_tail_layer(0) //horns update_horns(0) + //markings + update_markings(0) +//MARKINGS OVERLAY +/mob/living/carbon/human/proc/update_markings(var/update_icons=1) + world << "\red PROC CALLED" + //Reset our markings + overlays_standing[MARKINGS_LAYER] = null + + var/obj/item/organ/external/chest/chest_organ = get_organ("chest") + 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 && (src.species.bodyflags & HAS_MARKINGS)) + var/datum/sprite_accessory/marking_style = marking_styles_list[m_style] + if(marking_style && marking_style.species_allowed) + if(src.species.name in marking_style.species_allowed) + 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 markings for [species.name]: [horns]") + + overlays_standing[MARKINGS_LAYER] = image(markings_standing) + + if(update_icons) update_icons() + //HORN OVERLAY /mob/living/carbon/human/proc/update_horns(var/update_icons=1) //Reset our horns @@ -365,15 +397,15 @@ var/global/list/damage_icon_parts = list() if(update_icons) update_icons() return - //masks and helmets can obscure our horns, unless we're a synthetic + //masks and helmets can obscure our horns if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR))) if(update_icons) update_icons() return //base icons - var/icon/horns_standing = new /icon('icons/mob/body_accessory.dmi',"horns_none_s") + var/icon/horns_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s") - if(horns && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()) && (src.species.name == "Unathi"))) + if(horns && !(head && (head.flags & BLOCKHEADHAIR) && !(isSynthetic()) && (src.species.bodyflags & HAS_HORNS))) var/datum/sprite_accessory/horn_style = horn_styles_list[horns] if(horn_style && horn_style.species_allowed) if(src.species.name in horn_style.species_allowed) @@ -1053,6 +1085,7 @@ var/global/list/damage_icon_parts = list() //Human Overlays Indexes///////// #undef MUTANTRACE_LAYER +#undef MARKINGS_LAYER #undef MUTATIONS_LAYER #undef DAMAGE_LAYER #undef UNIFORM_LAYER diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 30b9db678a7..4ee2449150a 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -248,9 +248,19 @@ datum/preferences else preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT) + //Body Markings + if(current_species && (current_species.bodyflags & HAS_MARKINGS)) + var/datum/sprite_accessory/marking_style = marking_styles_list[m_style] + if(marking_style) + 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/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = current_species ? current_species.eyes : "eyes_s") eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD) + var/datum/sprite_accessory/hair_style = hair_styles_list[h_style] if(hair_style) var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s") @@ -264,7 +274,7 @@ datum/preferences eyes_s.Blend(facial_s, ICON_OVERLAY) //Horns - if(current_species && current_species.name == "Unathi") + if(current_species && (current_species.bodyflags & HAS_HORNS)) var/datum/sprite_accessory/horn_style = horn_styles_list[horns] if(horn_style) var/icon/horns_s = new/icon("icon" = horn_style.icon, "icon_state" = "[horn_style.icon_state]_s") @@ -272,19 +282,19 @@ datum/preferences eyes_s.Blend(horns_s, ICON_OVERLAY) var/icon/underwear_s = null - if(underwear && current_species.clothing_flags & HAS_UNDERWEAR) + if(underwear && (current_species.clothing_flags & HAS_UNDERWEAR)) var/datum/sprite_accessory/underwear/U = underwear_list[underwear] if(U) underwear_s = new/icon(U.icon, "uw_[U.icon_state]_s", ICON_OVERLAY) var/icon/undershirt_s = null - if(undershirt && current_species.clothing_flags & HAS_UNDERSHIRT) + if(undershirt && (current_species.clothing_flags & HAS_UNDERSHIRT)) var/datum/sprite_accessory/undershirt/U2 = undershirt_list[undershirt] if(U2) undershirt_s = new/icon(U2.icon, "us_[U2.icon_state]_s", ICON_OVERLAY) var/icon/socks_s = null - if(socks && current_species.clothing_flags & HAS_SOCKS) + if(socks && (current_species.clothing_flags & HAS_SOCKS)) var/datum/sprite_accessory/socks/U3 = socks_list[socks] if(U3) socks_s = new/icon(U3.icon, "sk_[U3.icon_state]_s", ICON_OVERLAY) diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index b857c6c6adb..7b5a05f7c28 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -564,25 +564,6 @@ */ /datum/sprite_accessory/hair - una_spines_long - name = "Long Unathi Spines" - icon_state = "soghun_longspines" - species_allowed = list("Unathi") - - una_spines_short - name = "Short Unathi Spines" - icon_state = "soghun_shortspines" - species_allowed = list("Unathi") - - una_frills_long - name = "Long Unathi Frills" - icon_state = "soghun_longfrills" - species_allowed = list("Unathi") - - una_frills_short - name = "Short Unathi Frills" - icon_state = "soghun_shortfrills" - species_allowed = list("Unathi") una_horns name = "Unathi Horns" @@ -872,6 +853,8 @@ /datum/sprite_accessory/facial_hair +//Tajara + taj_sideburns name = "Tajara Sideburns" icon_state = "facial_sideburns" @@ -902,6 +885,8 @@ icon_state = "facial_smallstache" species_allowed = list("Tajaran") +//Vox + vox_colonel name = "Vox Colonel Beard" icon_state = "vox_colonel" @@ -973,6 +958,51 @@ species_allowed = list("Vulpkanin") gender = NEUTER +//Unathi + + una_spines_long + name = "Long Unathi Spines" + icon_state = "soghun_longspines" + species_allowed = list("Unathi") + gender = NEUTER + + una_spines_short + name = "Short Unathi Spines" + icon_state = "soghun_shortspines" + species_allowed = list("Unathi") + gender = NEUTER + + una_frills_long + name = "Long Unathi Frills" + icon_state = "soghun_longfrills" + species_allowed = list("Unathi") + gender = NEUTER + + una_frills_short + name = "Short Unathi Frills" + icon_state = "soghun_shortfrills" + species_allowed = list("Unathi") + gender = NEUTER + + una_simple + name = "Simple" + icon_state = "soghun_longwebbed_frills" + species_allowed = list("Unathi") + gender = NEUTER + + una_short + name = "Short" + icon_state = "soghun_shortwebbed_frills" + species_allowed = list("Unathi") + gender = NEUTER + + una_aquatic + name = "Aquatic" + icon_state = "soghun_aquafrills" + species_allowed = list("Unathi") + gender = NEUTER + + //skin styles - WIP //going to have to re-integrate this with surgery //let the icon_state hold an icon preview for now @@ -1509,7 +1539,7 @@ /datum/sprite_accessory/horns/none name = "None" - icon_state = "horns_none" + icon_state = "accessory_none" /datum/sprite_accessory/horns/simple name = "Simple" @@ -1527,25 +1557,37 @@ name = "Ram" icon_state = "horns_ram" -/* FRILLS */ +/* BODY MARKINGS */ -/datum/sprite_accessory/frills +/datum/sprite_accessory/body_markings icon = 'icons/mob/body_accessory.dmi' species_allowed = list("Unathi") icon_state = null -/datum/sprite_accessory/frills/none +/datum/sprite_accessory/body_markings/none name = "None" - icon_state = null + icon_state = "accessory_none" -/datum/sprite_accessory/frills/simple - name = "Simple" - icon_state = "simple" +/datum/sprite_accessory/body_markings/dstripe + name = "Dark Stripe" + icon_state = "markings_dstripe" -/datum/sprite_accessory/frills/short - name = "Short" - icon_state = "short" +/datum/sprite_accessory/body_markings/lstripe + name = "Light Stripe" + icon_state = "markings_lstripe" -/datum/sprite_accessory/frills/aquatic - name = "Aquatic" - icon_state = "aqua" +/datum/sprite_accessory/body_markings/dtiger + name = "Dark Tiger Body" + icon_state = "markings_dtiger" + +/datum/sprite_accessory/body_markings/dtigerhead + name = "Dark Tiger Body + Head" + icon_state = "markings_dtigerhead" + +/datum/sprite_accessory/body_markings/ltiger + name = "Light Tiger Body" + icon_state = "markings_ltiger" + +/datum/sprite_accessory/body_markings/ltigerhead + name = "Light Tiger Body + Head" + icon_state = "markings_ltigerhead" diff --git a/icons/mob/body_accessory.dmi b/icons/mob/body_accessory.dmi index e18ce310a18..a4fc178e04b 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 e01e99ba040..4f9a7f5a959 100644 Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.dmi differ