prototype.alt_mode_icon_shift = {x,y}

Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

prototype.alt_mode_icon_shift = {x,y}

Post 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 954 times
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Bilka
Factorio Staff
Factorio Staff
Posts: 3127
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: prototype.alt_mode_icon_shift = {x,y}

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: prototype.alt_mode_icon_shift = {x,y}

Post 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)?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Bilka
Factorio Staff
Factorio Staff
Posts: 3127
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: prototype.alt_mode_icon_shift = {x,y}

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: prototype.alt_mode_icon_shift = {x,y}

Post 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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Implemented mod requests”