Page 1 of 1

Add interface for research_progress for not-currently-researching technologies

Posted: Mon Apr 22, 2024 3:36 am
by cliff_build
Specifically, if someone starts researching a technology, and then switches to a different one, I believe that it is no longer possible to tell how much progress has been made on the first technology via the Lua APIs. (because `LuaForce.research_progress` only tells you about the current research)

I want to build a UI inside of the BiterBattles scenario that shows the research state of both teams. It is relatively common that one team will start researching the rocket silo, but then switch to a different technology half-way-through because they ran out of purple science or something. Currently, I am considering just adding an `on_nth_tick` callback that looks at `LuaForce.research_progress` in order to have an approximation of the true value, but it feels to me like it would be cleaner if there was a proper API for this.

Re: Add interface for research_progress for not-currently-researching technologies

Posted: Mon Apr 22, 2024 4:27 am
by boskid

Re: Add interface for research_progress for not-currently-researching technologies

Posted: Wed Apr 24, 2024 12:28 am
by cliff_build
Awesome, thank you!