Mech Appearance Update

This commit is contained in:
Mechoid
2021-01-24 11:18:05 -08:00
committed by VirgoBot
parent f74536a0b6
commit 31b779b6fa
15 changed files with 146 additions and 17 deletions
@@ -286,6 +286,9 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
if(part.transparent) //VOREStation Edit. For better slime limbs. Avoids using solid var due to limb dropping.
icon_key += "_t" //VOREStation Edit.
if(istype(tail_style, /datum/sprite_accessory/tail/taur))
icon_key += tail_style.clip_mask_state
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])
@@ -295,10 +298,26 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
var/obj/item/organ/external/chest = get_organ(BP_TORSO)
base_icon = chest.get_icon()
var/icon/Cutter = null
if(istype(tail_style, /datum/sprite_accessory/tail/taur)) // Tail icon 'cookie cutters' are filled in where icons are preserved. We need to invert that.
Cutter = new(icon = tail_style.icon, icon_state = tail_style.clip_mask)
Cutter.Blend("#000000", ICON_MULTIPLY) // Make it all black.
Cutter.SwapColor("#00000000", "#FFFFFFFF") // Everywhere empty, make white.
Cutter.SwapColor("#000000FF", "#00000000") // Everywhere black, make empty.
Cutter.Blend("#000000", ICON_MULTIPLY) // Black again.
for(var/obj/item/organ/external/part in organs)
if(isnull(part) || part.is_stump() || part.is_hidden_by_tail()) //VOREStation Edit allowing tails to prevent bodyparts rendering, granting more spriter freedom for taur/digitigrade stuff.
continue
var/icon/temp = part.get_icon(skeleton)
if((part.organ_tag in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT)) && Cutter)
temp.Blend(Cutter, ICON_AND, x = -16)
//That part makes left and right legs drawn topmost and lowermost when human looks WEST or EAST
//And no change in rendering for other parts (they icon_position is 0, so goes to 'else' part)
if(part.icon_position & (LEFT | RIGHT))