mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-12 07:35:31 +01:00
VS: Tweak some icon blending
This commit is contained in:
@@ -591,11 +591,11 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
|
||||
//Build a uniform sprite
|
||||
//VOREStation Edit start.
|
||||
var/icon/c_mask = null
|
||||
if(tail_style && tail_style.clip_mask_icon && tail_style.clip_mask_state)
|
||||
var/icon/c_mask = tail_style?.clip_mask
|
||||
if(c_mask)
|
||||
var/obj/item/clothing/suit/S = wear_suit
|
||||
if(!(wear_suit && ((wear_suit.flags_inv & HIDETAIL) || (istype(S) && S.taurized)))) //Clip the lower half of the uniform off using the tail's clip mask.
|
||||
c_mask = new /icon(tail_style.clip_mask_icon, tail_style.clip_mask_state)
|
||||
if(!istype(S) || (wear_suit.flags_inv & HIDETAIL) || S.taurized) // Reasons to not mask
|
||||
c_mask = null
|
||||
overlays_standing[UNIFORM_LAYER] = w_uniform.make_worn_icon(body_type = species.get_bodytype(src), slot_name = slot_w_uniform_str, default_icon = uniform_sprite, default_layer = UNIFORM_LAYER, clip_mask = c_mask)
|
||||
//VOREStation Edit end.
|
||||
apply_layer(UNIFORM_LAYER)
|
||||
@@ -779,10 +779,10 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
//VOREStation Edit start.
|
||||
var/icon/c_mask = null
|
||||
var/tail_is_rendered = (overlays_standing[TAIL_LAYER] || overlays_standing[TAIL_LAYER_ALT])
|
||||
var/valid_clip_mask = (tail_style && tail_style.clip_mask_icon && tail_style.clip_mask_state)
|
||||
var/valid_clip_mask = tail_style?.clip_mask
|
||||
|
||||
if(tail_is_rendered && valid_clip_mask && !(suit && istype(suit) && suit.taurized)) //Clip the lower half of the suit off using the tail's clip mask for taurs since taur bodies aren't hidden.
|
||||
c_mask = new /icon(tail_style.clip_mask_icon, tail_style.clip_mask_state)
|
||||
c_mask = valid_clip_mask
|
||||
overlays_standing[SUIT_LAYER] = wear_suit.make_worn_icon(body_type = species.get_bodytype(src), slot_name = slot_wear_suit_str, default_icon = suit_sprite, default_layer = SUIT_LAYER, clip_mask = c_mask)
|
||||
|
||||
//VOREStation Edit end.
|
||||
|
||||
@@ -1,50 +1,3 @@
|
||||
// WARNING - UNUSED PROC
|
||||
/mob/living/carbon/human/proc/get_wing_icon()
|
||||
if(QDESTROYING(src))
|
||||
return
|
||||
|
||||
var/icon_key = "[species.get_race_key(src)][r_skin][g_skin][b_skin][r_hair][g_hair][b_hair]"
|
||||
var/icon/wing_icon = wing_icon_cache[icon_key]
|
||||
if(!wing_icon)
|
||||
//generate a new one
|
||||
var/species_wing_anim = species.get_wing_animation(src)
|
||||
if(species.icobase_wing) species_wing_anim = species.icobase
|
||||
if(!species_wing_anim) species_wing_anim = 'icons/effects/species.dmi'
|
||||
wing_icon = new/icon(species_wing_anim)
|
||||
if(species.color_mult)
|
||||
wing_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_MULTIPLY)
|
||||
else
|
||||
wing_icon.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
|
||||
// The following will not work with animated wings.
|
||||
var/use_species_wing = species.get_wing_hair(src)
|
||||
if(use_species_wing)
|
||||
var/icon/hair_icon = icon('icons/effects/species.dmi', "[species.get_wing(src)]_[use_species_wing]")
|
||||
hair_icon.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
|
||||
wing_icon.Blend(hair_icon, ICON_OVERLAY)
|
||||
wing_icon_cache[icon_key] = wing_icon
|
||||
|
||||
return wing_icon
|
||||
|
||||
// WARNING - UNUSED PROC
|
||||
/mob/living/carbon/human/proc/set_wing_state(var/t_state)
|
||||
if(QDESTROYING(src))
|
||||
return
|
||||
|
||||
var/image/wing_overlay = overlays_standing[WING_LAYER]
|
||||
|
||||
if(wing_overlay && species.get_wing_animation(src))
|
||||
wing_overlay.icon_state = t_state
|
||||
return wing_overlay
|
||||
return null
|
||||
|
||||
// WARNING - UNUSED PROC
|
||||
/mob/living/carbon/human/proc/animate_wing_reset(var/update_icons=1)
|
||||
if(stat != DEAD)
|
||||
set_wing_state("[species.get_wing(src)]_idle[rand(0,9)]")
|
||||
else
|
||||
set_wing_state("[species.get_wing(src)]_static")
|
||||
toggle_wing_vr(FALSE)
|
||||
|
||||
/mob/living/carbon/human/proc/get_wing_image()
|
||||
if(QDESTROYING(src))
|
||||
return
|
||||
|
||||
@@ -791,6 +791,12 @@
|
||||
var/list/hide_body_parts = list() //Uses organ tag defines. Bodyparts in this list do not have their icons rendered, allowing for more spriter freedom when doing taur/digitigrade stuff.
|
||||
var/icon/clip_mask_icon = null //Icon file used for clip mask.
|
||||
var/clip_mask_state = null //Icon state to generate clip mask. Clip mask is used to 'clip' off the lower part of clothing such as jumpsuits & full suits.
|
||||
var/icon/clip_mask = null //Instantiated clip mask of given icon and state
|
||||
|
||||
/datum/sprite_accessory/tail/New()
|
||||
. = ..()
|
||||
if(clip_mask_icon && clip_mask_state)
|
||||
clip_mask = icon(icon = clip_mask_icon, icon_state = clip_mask_state)
|
||||
|
||||
// Species-unique tails
|
||||
|
||||
|
||||
Reference in New Issue
Block a user