Page 1 of 1

prototype.alt_mode_icon_shift = {x,y}

Posted: Sat May 04, 2019 2:53 pm
by eradicator
What?

The ability to specify that the alt-mode icon for an assembler or furnace type entity is to be displayed somewhere else than the center of an entity. And optionally the ability to disable the standard black background circle of alt-info icons.

Why?

To make it possible to have custom entitiy graphics that can integrate the alt-info in a way that does not obstruct the view of the entity, i.e. by showing the alt-icon on a "billboard" in front of the entity, or a similar "display" stilized region of the entity picture.
rect3928.png
rect3928.png (344.61 KiB) Viewed 1172 times

Re: prototype.alt_mode_icon_shift = {x,y}

Posted: Sat May 04, 2019 3:15 pm
by Bilka
Apparently the shift was already a thing, just not exposed to Lua, so it was trivial to add. Just to prevent some confusion in the future: Assembling machines default the shift to {0, -0.3} and furnaces to {0, -0.1}, not {0, 0}. So if you want {0, 0}, you have to explicitly set it.

Re: prototype.alt_mode_icon_shift = {x,y}

Posted: Sat May 04, 2019 3:28 pm
by eradicator
That must've set a new record for fasted implemented request, thanks!
What's it called then? And what about disabling the black background (as it is rather large)?

Re: prototype.alt_mode_icon_shift = {x,y}

Posted: Sat May 04, 2019 3:51 pm
by Bilka
It will be called "entity_info_icon_shift".
I added "draw_entity_info_icon_background" to turn off the background for entity info icons of crafting machines in the next version.

Re: prototype.alt_mode_icon_shift = {x,y}

Posted: Sat May 04, 2019 5:22 pm
by eradicator
Bilka wrote: Sat May 04, 2019 3:51 pm It will be called "entity_info_icon_shift".
I added "draw_entity_info_icon_background" to turn off the background for entity info icons of crafting machines in the next version.
Its so much more fun to mod when you don't have to wait over a year for "implemented for next version" requests :D.
Thank you very much again.