From 3103b164894befca1552f01260c0cf7f14b4081a Mon Sep 17 00:00:00 2001 From: Datraen Date: Thu, 12 May 2016 12:41:26 -0400 Subject: [PATCH] Adds colorable headtail. This required ear slots to inherit color for mob sprites, and this was also given to glasses. --- .../preference_setup/loadout/loadout_xeno.dm | 20 +++++++++++ code/modules/clothing/ears/skrell.dm | 12 +++++++ .../mob/living/carbon/human/update_icons.dm | 36 ++++++++++++------- 3 files changed, 55 insertions(+), 13 deletions(-) diff --git a/code/modules/client/preference_setup/loadout/loadout_xeno.dm b/code/modules/client/preference_setup/loadout/loadout_xeno.dm index f3e56cf1dd..9f814743ae 100644 --- a/code/modules/client/preference_setup/loadout/loadout_xeno.dm +++ b/code/modules/client/preference_setup/loadout/loadout_xeno.dm @@ -68,6 +68,26 @@ clothtypes[initial(cloth.name)] = cloth gear_tweaks += new/datum/gear_tweak/path(sortAssoc(clothtypes)) +/datum/gear/ears/skrell/colored/band + display_name = "Colored bands (Skrell)" + path = /obj/item/clothing/ears/skrell/colored/band + sort_category = "Xenowear" + whitelisted = "Skrell" + +/datum/gear/ears/skrell/colored/band/New() + ..() + gear_tweaks = list(gear_tweak_free_color_choice) + +/datum/gear/ears/skrell/colored/chain + display_name = "Colored chain (Skrell)" + path = /obj/item/clothing/ears/skrell/colored/chain + sort_category = "Xenowear" + whitelisted = "Skrell" + +/datum/gear/ears/skrell/colored/chain/New() + ..() + gear_tweaks = list(gear_tweak_free_color_choice) + /datum/gear/uniform/teshari display_name = "smock, grey (Teshari)" path = /obj/item/clothing/under/seromi diff --git a/code/modules/clothing/ears/skrell.dm b/code/modules/clothing/ears/skrell.dm index 215a0a9ff1..e8bc3e8534 100644 --- a/code/modules/clothing/ears/skrell.dm +++ b/code/modules/clothing/ears/skrell.dm @@ -70,6 +70,18 @@ icon_state = "skrell_band_ebony" item_state = "skrell_band_ebony" +/obj/item/clothing/ears/skrell/colored/band + name = "Colored headtail bands" + desc = "Metallic bands worn by male skrell to adorn their head tails." + icon_state = "skrell_band_sil" + item_state = "skrell_band_sil" + +/obj/item/clothing/ears/skrell/colored/chain + name = "Colored headtail chains" + desc = "A delicate chain worn by female skrell to decorate their head tails." + icon_state = "skrell_chain_sil" + item_state = "skrell_chain_sil" + /obj/item/clothing/ears/skrell/cloth_female name = "red headtail cloth" desc = "A cloth shawl worn by female skrell draped around their head tails." diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 7f0489b90f..b15db41f51 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -556,13 +556,15 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/update_inv_glasses(var/update_icons=1) if(glasses) - + var/image/standing if(glasses.icon_override) - overlays_standing[GLASSES_LAYER] = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]") + standing = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]") else if(glasses.sprite_sheets && glasses.sprite_sheets[species.get_bodytype(src)]) - overlays_standing[GLASSES_LAYER]= image("icon" = glasses.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[glasses.icon_state]") + standing = image("icon" = glasses.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[glasses.icon_state]") else - overlays_standing[GLASSES_LAYER]= image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]") + standing = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]") + standing.color = glasses.color + overlays_standing[GLASSES_LAYER] = standing else overlays_standing[GLASSES_LAYER] = null @@ -575,29 +577,37 @@ var/global/list/damage_icon_parts = list() return if(l_ear || r_ear) + var/image/both = image("icon" = null) + if(l_ear) - + var/image/standing var/t_type = l_ear.icon_state if(l_ear.icon_override) t_type = "[t_type]_l" - overlays_standing[EARS_LAYER] = image("icon" = l_ear.icon_override, "icon_state" = "[t_type]") + standing = image("icon" = l_ear.icon_override, "icon_state" = "[t_type]") else if(l_ear.sprite_sheets && l_ear.sprite_sheets[species.get_bodytype(src)]) t_type = "[t_type]_l" - overlays_standing[EARS_LAYER] = image("icon" = l_ear.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[t_type]") + standing = image("icon" = l_ear.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[t_type]") else - overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]") - + standing = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]") + standing.color = l_ear.color + both.overlays += standing + if(r_ear) - + var/image/standing var/t_type = r_ear.icon_state if(r_ear.icon_override) t_type = "[t_type]_r" - overlays_standing[EARS_LAYER] = image("icon" = r_ear.icon_override, "icon_state" = "[t_type]") + standing = image("icon" = r_ear.icon_override, "icon_state" = "[t_type]") else if(r_ear.sprite_sheets && r_ear.sprite_sheets[species.get_bodytype(src)]) t_type = "[t_type]_r" - overlays_standing[EARS_LAYER] = image("icon" = r_ear.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[t_type]") + standing = image("icon" = r_ear.sprite_sheets[species.get_bodytype(src)], "icon_state" = "[t_type]") else - overlays_standing[EARS_LAYER] = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]") + standing = image("icon" = 'icons/mob/ears.dmi', "icon_state" = "[t_type]") + standing.color = r_ear.color + both.overlays += standing + + overlays_standing[EARS_LAYER] = both else overlays_standing[EARS_LAYER] = null