Add interface for research_progress for not-currently-researching technologies

Things that already exist in the current mod API
cliff_build
Inserter
Inserter
Posts: 20
Joined: Thu Dec 03, 2020 4:52 pm
Contact:

Add interface for research_progress for not-currently-researching technologies

Post 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.
Post Reply

Return to “Already exists”