LuaRendering.draw_sprite{respect_alt_mode=}

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

LuaRendering.draw_sprite{respect_alt_mode=}

Post by eradicator »

What?
A method (i don't care what method) to make rendered sprites respect each players alt-mode setting.

Why?
To make vanilla-style informative overlays that the player can dis/enabled at will.
Because a native implementation would hopefully be much faster than manually calling set_players() on thousands of objects.
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.

Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: LuaRendering.draw_sprite{respect_alt_mode=}

Post by Boodals »

I have implemented this for 0.17.45 (didn't make it into todays release unfortunately). All rendering.draw_X functions will have the only_in_alt_mode parameter, as well as a getter and setter.

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

Re: LuaRendering.draw_sprite{respect_alt_mode=}

Post by eradicator »

Awesome. Thank you.
Why don't you have a staff name though?
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.

Boodals
Fast Inserter
Fast Inserter
Posts: 129
Joined: Sun Feb 11, 2018 7:10 pm
Contact:

Re: LuaRendering.draw_sprite{respect_alt_mode=}

Post by Boodals »

Sorry, I usually mention that I have source access. I can submit pull requests to add small stuff like api requests and bug fixes, but i'm not a wube dev.

Post Reply

Return to “Implemented mod requests”