Page 1 of 1

Add a LuaForce.research_queue function

Posted: Wed Apr 03, 2019 6:04 pm
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.

Re: Add a LuaForce.research_queue function

Posted: Mon Apr 08, 2019 11:23 am
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.

Re: Add a LuaForce.research_queue function

Posted: Mon Apr 08, 2019 10:46 pm
by Muppet9010
thanks, works as expected :)