diff --git a/code/_helpers/icons_vr.dm b/code/_helpers/icons_vr.dm index 60765578e7..1b500862b6 100644 --- a/code/_helpers/icons_vr.dm +++ b/code/_helpers/icons_vr.dm @@ -43,17 +43,3 @@ if (I.GetPixel(x_pixel, y_pixel)) return y_pixel - 1 return null - -//Standard behaviour is to cut pixels from the main icon that are covered by pixels from the mask icon unless passed mask_ready, see below. -/proc/get_icon_difference(var/icon/main, var/icon/mask, var/mask_ready) - /*You should skip prep if the mask is already sprited properly. This significantly improves performance by eliminating most of the realtime icon work. - e.g. A 'ready' mask is a mask where the part you want cut out is missing (no pixels, 0 alpha) from the sprite, and everything else is solid white.*/ - - if(istype(main) && istype(mask)) - if(!mask_ready) //Prep the mask if we're using a regular old sprite and not a special-made mask. - mask.Blend(rgb(255,255,255), ICON_SUBTRACT) //Make all pixels on the mask as black as possible. - mask.Opaque(rgb(255,255,255)) //Make the transparent pixels (background) white. - mask.BecomeAlphaMask() //Make all the black pixels vanish (fully transparent), leaving only the white background pixels. - - main.AddAlphaMask(mask) //Make the pixels in the main icon that are in the transparent zone of the mask icon also vanish (fully transparent). - return main diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index db628c406e..6fd5f0b386 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -770,13 +770,13 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. if(!inhands) apply_custom(standing_icon) //Pre-image overridable proc to customize the thing apply_addblends(icon2use,standing_icon) //Some items have ICON_ADD blend shaders - if(istype(clip_mask)) //VOREStation Edit - For taur bodies/tails clipping off parts of uniforms and suits. - standing_icon = get_icon_difference(standing_icon, clip_mask, 1) var/image/standing = image(standing_icon) standing.alpha = alpha standing.color = color standing.layer = layer2use + if(istype(clip_mask)) //VOREStation Edit - For taur bodies/tails clipping off parts of uniforms and suits. + standing.filters += filter(type = "alpha", icon = clip_mask) //Apply any special features if(!inhands) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 7b735b0dbe..fd39b2a745 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -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. diff --git a/code/modules/mob/living/carbon/human/update_icons_vr.dm b/code/modules/mob/living/carbon/human/update_icons_vr.dm index a8b941ebc3..45a5690ae6 100644 --- a/code/modules/mob/living/carbon/human/update_icons_vr.dm +++ b/code/modules/mob/living/carbon/human/update_icons_vr.dm @@ -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 diff --git a/code/modules/vore/appearance/sprite_accessories_vr.dm b/code/modules/vore/appearance/sprite_accessories_vr.dm index 67222aab21..9cc59ec2e2 100644 --- a/code/modules/vore/appearance/sprite_accessories_vr.dm +++ b/code/modules/vore/appearance/sprite_accessories_vr.dm @@ -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