Colors on-mob sprites

This commit is contained in:
Hubblenaut
2015-12-16 20:42:49 +01:00
parent 760097b3b7
commit ffc6e7dcb7
@@ -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