Add a LuaForce.research_queue function

Post Reply
User avatar
Muppet9010
Filter Inserter
Filter Inserter
Posts: 278
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

Add a LuaForce.research_queue function

Post by Muppet9010 »

The new LuaForce.research_queue would expose read/write access to the forces current research queue as a numbered dictionary of technologies. With number 1 being the current research and counting up the queue.
When read it would return LuaTechnology and when writing it would accept TechnologySpecification. Same types as previous_research and current_research.

This would allow mods to identify (read) future scheduled researches in the queue and to manipulate them if desired.

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

Re: Add a LuaForce.research_queue function

Post by Bilka »

Okay, added to the next version.

Note for mod makers: I have removed the LuaForce::current_research write in the next version, you will have to use LuaForce::add_research() and cancel_current_research() instead (those are added by the next version). This change was made because the current_research write did not work correctly with the research queue.
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
Muppet9010
Filter Inserter
Filter Inserter
Posts: 278
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

Re: Add a LuaForce.research_queue function

Post by Muppet9010 »

thanks, works as expected :)

Post Reply

Return to “Implemented mod requests”