Extended Research Queue

by sh4dow

A better GUI for managing the research queue. Fork of sonaxaton-research-queue adding compatability with the vanilla research queue.

Utilities
2 years ago
1.0 - 1.1
4.43K

a Added to incompatibility list - Auto Research

11 months ago

I added this mod to the incompat list of https://mods.factorio.com/mod/some-autoresearch due to: https://mods.factorio.com/mod/some-autoresearch/discussion/659724b3423aabe1d569516f

If this gets fixed, feel free to contact me :)

10 months ago

This is just intended as an extension to the Improved Research Queue mod; I've not taking over maintenance of the full codebase.
It also seems like this issue would be difficult to fix - both ERQ and AR need to change the research list in onResearchFinished. So just from the current architecture of the mods there are inevitably race conditions.

Having Auto Research wait a tick before assigning the new research might or might not solve this issue - if the vanilla queue is disabled, that would overwrite the queue from this mod, but you could trivially check for that case in your code (don't call add_reseach when current_research is set and queue disabled); otherwise, at least some vanilla queue integrations should work properly (wait/freeze should definitely work properly; head/tail/sync/hybrid might or might not work when there are ERQ-queued techs, but shouldn't block a research from being started).
Or, more generally, if you always check that current_research is nil before calling add_research, I don't see any way it would cause issues, as long as it's not called from an event (ie. only 1 tick after onResearchFinished).

10 months ago
(updated 10 months ago)

Alternatively, I think if you put extended research queue and/or flib(1) as an optional dependency in Auto Research, you would only have to add the current_research check(2) for both mods to be compatible. Then your events would run after mine, which is all the 1 tick delay was supposed to guarantee, and the current_research check should probably even be enough to be compatible with the original sonaxaton_research_queue as long as you also add it as an optional dependency.

(1) it might be enough to add flib (depending on the internal event handling in flib), but adding only extended research queue (/improved research queue) as optional dependencies would be enough.
(2) forcing config.allow_switching to false if either research queue mod is present should be enough if events are executed in the correct order

New response