ID:2732292
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
Is it possible to bring the filter(type="alpha") functionality to overlays? I'm trying to add a torn equipment visual effect as an overlay, but the problem is that the two recommended solutions, using BLEND_INSET_OVERLAY and filter(type="alpha") does not work for what I am trying to do.

While I could use the inset overlay solution, but I would have to make a coding solution where the original icon of the object is converted into an overlay of itself with BLEND_INSET_OVERLAY, and the icon of the torn clothing mask the actual icon, which is a little weird.

The filter solution works almost perfectly, however it does not respect the direction of the object that is attached to and it is very noticeable when the character turns directions. A solution would be to create 4 different icons and apply a filter if it's facing a certain direction, however that would involve a lot of weird code and too many icons for an object.
https://i.imgur.com/On9CnQK.png Forgot to include an image of the described effect.
Why not use vis_contents? It's better than overlays in almost every way. Including performance in most situations.
In response to Ter13
Ter13 wrote:
Why not use vis_contents? It's better than overlays in almost every way. Including performance in most situations.

Do vis_contents work on overlays itself? This is for clothing, and the clothing sprite itself on players has a different model than its inventory/world sprite, so it has to be an overlay.
In response to BurgerBB
Overlays are static; they're appearances attached to other appearances.

I don't understand what you mean by "a different model" though.
In response to BurgerBB
vis_contents can use/accept any /atom. Sounds to me like you have a icon_state or image that is the inventory "state" why not have it have an icon_state that cannot be assumed by an equipped player..

Then you can set VIS_INHERIT_ICON_STATE on the equipment. Add said item to the users vis_contents and the item in the inventory will stay displaying as it should but the "COPY"(lightly using this term) will display using the current icon_state of the player.(as it changes as well)

Also vis_contents have an option to also mirror the direction of the attached object. VIS_INHERIT_DIR
In response to Lummox JR
Lummox JR wrote:
Overlays are static; they're appearances attached to other appearances.

I don't understand what you mean by "a different model" though.

What I mean by different model is that is that the "on the turf" icon is completely different than the "on the mob" icon, and two must be shown at once.

Here is how the system works.

/mob/ is wearing an /obj/item
/obj/item's is showing up on the client's inventory bar as vis_content , representing what it looks like on the ground. Since the icon_state of the /obj/item frequently changes, it makes sense to use it as a vis_content.
An /image/ of the /obj/item's worn icon was created and added to /mob/ since visual changes aren't too common.
In response to BurgerBB
Please refer to my last message on things you ca do that do exactly what you want with no work from yourself.

Vis_contents is more powerful and doesn't require a second appearance to be created of the same object to apply it visually. Going by your example using VIS_INHERIT_ICON_STATE will make it appear on the player as "clothing" regardless of its icon_state in the inventory bar as the "appearance"/copy of it on the player will use the anchor objects information for icon_state solely.

*edit: ahh, hm.. the containing cells of the hotbar/inventory could take information from the object when its put in to it so that it can display that less-unique information that way.