Add more information to on_research_moved
Posted: Thu May 28, 2026 7:32 am
I recently went to use the on_research_moved event for the first time, and was surprised to find practically no useful information in the event data.
A touch of testing seems to prove that it fires once for every technology that is moved in the queue, so I'm shocked it doesn't, at a minimum, contain what technology was moved.
On top of that I request the index it came from and its destination index.
If it's possible for multiple technologies to be moved with one event, I would like an array of that same information. Though I can understand the specific indexes being less reasonable. I mostly just want to know if they moved forwards or backwards to match the in-game chat messages.
Theoretically I could figure that information out by tracking the research queue myself, but I'd rather this specific code to be stateless.
A touch of testing seems to prove that it fires once for every technology that is moved in the queue, so I'm shocked it doesn't, at a minimum, contain what technology was moved.
On top of that I request the index it came from and its destination index.
If it's possible for multiple technologies to be moved with one event, I would like an array of that same information. Though I can understand the specific indexes being less reasonable. I mostly just want to know if they moved forwards or backwards to match the in-game chat messages.
Theoretically I could figure that information out by tracking the research queue myself, but I'd rather this specific code to be stateless.