Page 1 of 1

[1.1.5] Item-with-entity-data uses `icons` instead of `pictures` when placed in world

Posted: Tue Dec 08, 2020 12:12 am
by kirazy
Context:
I have layered icons with tier pips, and to avoid displaying the tier pips in-world on belts and on the ground, I set the `pictures` field for items, but it is not working for `items-with-entity-data` which per the wiki inherits the `pictures` field from the `item` prototype:
Image

In inventory, they show up as `item-with-entity-data`:
Image

Inspecting the item, the pictures field is properly defined:
Image
Image

But it seems to be being ignored. This does work properly for literally everything else, though. I'm also pretty certain this used to work, because I remember having to write the code to specifically handle `items-with-entity-data` and once done, it worked.

I've created a minimal save with the needed mods to explore the issue.

Re: [1.1.5] Item-with-entity-data uses `icons` instead of `pictures` when placed in world

Posted: Tue Dec 08, 2020 8:38 am
by Klonan
This is intended, not a bug

Some item types use custom drawing, such as blueprints, upgrade planners, and item-with-entity-data

For item-with-entity-data, it is so it can draw the sprite with the tinted overlay (spidertron)

Re: [1.1.5] Item-with-entity-data uses `icons` instead of `pictures` when placed in world

Posted: Tue Dec 08, 2020 8:59 am
by kirazy
Hm. Is there a workaround for my use case or am I SOL?

Re: [1.1.5] Item-with-entity-data uses `icons` instead of `pictures` when placed in world

Posted: Tue Dec 08, 2020 9:25 am
by kirazy
Klonan wrote: Tue Dec 08, 2020 8:38 amFor item-with-entity-data, it is so it can draw the sprite with the tinted overlay (spidertron)
Looking at it on the wiki, this new behavior only really seems to matter if icon_tintable/s or icon_tintable_mask/s are defined. Is it possible for this behavior to be conditional on those being specified, ergo if those are nil, pictures draws instead of icons?