Combined with the new research queue it is very hard to keep track of canceled research as there is no on_research_canceled event and on_research_finished does not fire.
Current workaround is to check on each tick for every force if they changed their research.
If it swims like a dolphin, walks like a duck and moo's like a cow it is an Enterprise System!
Boodals wrote: ↑Sat Mar 02, 2019 4:43 pm
What is your use case?
I would imagine something like:
- Tell player to research technology X
- Get event that they started research
- Tell them to wait for research to complete
- Get event they finished research
- Tell them what to do next
But if they cancel the research, you're just telling them to wait for research forever, when you would prefer to change your message to "Resume researching technology X"
- Look for "your" research started
- Look for research changed, if "yours" is last_research or "yours" is not finished demand to change back
- Look for "yours" to be finished.
Edit: uuh well is canceling a thing now?
then reserach_canceled should also be a new event