From 0c5d6816ebda858108b720ae61a526f6fb60dede Mon Sep 17 00:00:00 2001 From: Someone Date: Sat, 26 Oct 2024 16:24:23 +0200 Subject: [PATCH] RELEASE 2.0.5 - Manages the last element of the research queue now. Should be more intuitive now --- changelog.txt | 7 +++++++ control.lua | 7 ++++--- info.json | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index c44ce5d..c6f1e89 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,10 @@ +--------------------------------------------------------------------------------------------------- +Version: 2.0.5 +Date: 2024-10-26 + + Changed: + - Manages the last element of the research queue now. Should be more intuitive now. + --------------------------------------------------------------------------------------------------- Version: 2.0.4 Date: 2024-10-23 diff --git a/control.lua b/control.lua index 266a0a9..ce1a090 100644 --- a/control.lua +++ b/control.lua @@ -224,11 +224,11 @@ function startNextResearch(force, override_spam_detection) -- keep queue, just put next_research at the start. if next_research then local rq = {} - table.insert(rq, next_research) - for i=1,6 do + -- manage last element of research queue + for i=1,7 do if force.research_queue[i] == nil then break end - if i == 1 then + if i == (#force.research_queue) then if not (force.current_research and config.allow_switching) then table.insert(rq, force.research_queue[i].name) end @@ -236,6 +236,7 @@ function startNextResearch(force, override_spam_detection) table.insert(rq, force.research_queue[i].name) end end + table.insert(rq, next_research) force.research_queue = rq end diff --git a/info.json b/info.json index 56f73bb..d4f2f9b 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "some-autoresearch", - "version": "2.0.4", + "version": "2.0.5", "title": "Auto Research (fixed + re-published)", "author": "Someone (originally canidae)", "homepage": "https://git.somenet.org/factorio/some-autoresearch.git", -- 2.43.0