From ffc6e7dcb74d00945f92e6beca987635b1d713d9 Mon Sep 17 00:00:00 2001 From: Hubblenaut Date: Wed, 16 Dec 2015 20:42:49 +0100 Subject: [PATCH] Colors on-mob sprites --- .../mob/living/carbon/human/update_icons.dm | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 3e5731543c..35f19e3a97 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -491,6 +491,7 @@ var/global/list/damage_icon_parts = list() //need to append _s to the icon state for legacy compatibility var/image/standing = image(icon = under_icon, icon_state = "[under_state]_s") + standing.color = under.color //apply blood overlay if(w_uniform.blood_DNA) @@ -551,6 +552,7 @@ var/global/list/damage_icon_parts = list() bloodsies.color = gloves.blood_color standing.overlays += bloodsies gloves.screen_loc = ui_gloves + standing.color = gloves.color overlays_standing[GLOVES_LAYER] = standing else if(blood_DNA) @@ -626,6 +628,7 @@ var/global/list/damage_icon_parts = list() var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "shoeblood") bloodsies.color = shoes.blood_color standing.overlays += bloodsies + standing.color = shoes.color overlays_standing[SHOES_LAYER] = standing else if(feet_blood_DNA) @@ -691,6 +694,7 @@ var/global/list/damage_icon_parts = list() if(hat.on && light_overlay_cache[cache_key]) standing.overlays |= light_overlay_cache[cache_key] + standing.color = head.color overlays_standing[HEAD_LAYER] = standing else @@ -725,6 +729,8 @@ var/global/list/damage_icon_parts = list() if(!i_state) i_state = i.icon_state standing.overlays += image("icon" = 'icons/mob/belt.dmi', "icon_state" = "[i_state]") + standing.color = belt.color + overlays_standing[belt_layer] = standing else overlays_standing[BELT_LAYER] = null @@ -748,6 +754,7 @@ var/global/list/damage_icon_parts = list() t_icon = wear_suit.item_icons[slot_wear_suit_str] standing = image("icon" = t_icon, "icon_state" = "[wear_suit.icon_state]") + standing.color = wear_suit.color if( istype(wear_suit, /obj/item/clothing/suit/straight_jacket) ) drop_from_inventory(handcuffed) @@ -789,6 +796,7 @@ var/global/list/damage_icon_parts = list() standing = image("icon" = wear_mask.sprite_sheets[species.get_bodytype()], "icon_state" = "[wear_mask.icon_state]") else standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]") + standing.color = wear_mask.color if( !istype(wear_mask, /obj/item/clothing/mask/smokable/cigarette) && wear_mask.blood_DNA ) var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "maskblood") @@ -828,8 +836,12 @@ var/global/list/damage_icon_parts = list() else overlay_state = back.icon_state + //apply color + var/image/standing = image(icon = overlay_icon, icon_state = overlay_state) + standing.color = back.color + //create the image - overlays_standing[BACK_LAYER] = image(icon = overlay_icon, icon_state = overlay_state) + overlays_standing[BACK_LAYER] = standing else overlays_standing[BACK_LAYER] = null @@ -908,7 +920,11 @@ var/global/list/damage_icon_parts = list() else t_icon = INV_R_HAND_DEF_ICON - overlays_standing[R_HAND_LAYER] = image(icon = t_icon, icon_state = t_state) + //apply color + var/image/standing = image(icon = t_icon, icon_state = t_state) + standing.color = r_hand.color + + overlays_standing[R_HAND_LAYER] = standing if (handcuffed) drop_r_hand() //this should be moved out of icon code else @@ -940,7 +956,11 @@ var/global/list/damage_icon_parts = list() else t_icon = INV_L_HAND_DEF_ICON - overlays_standing[L_HAND_LAYER] = image(icon = t_icon, icon_state = t_state) + //apply color + var/image/standing = image(icon = t_icon, icon_state = t_state) + standing.color = l_hand.color + + overlays_standing[L_HAND_LAYER] = standing if (handcuffed) drop_l_hand() //This probably should not be here else