RELEASE 2.0.5 - Manages the last element of the research queue now. Should be more...
authorSomeone <someone@somenet.org>
Sat, 26 Oct 2024 14:24:23 +0000 (16:24 +0200)
committerSomeone <someone@somenet.org>
Sat, 26 Oct 2024 14:24:23 +0000 (16:24 +0200)
changelog.txt
control.lua
info.json

index c44ce5d56cec8ecfd79d13bc8fe21f4373d505c4..c6f1e892cdb7abd95e1ec950fb21360ffe3b6ff0 100644 (file)
@@ -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
index 266a0a962b2cd0e8e0e77a7d659452781a52bcb0..ce1a090606f5ec6d010102695571b8edb773d1e1 100644 (file)
@@ -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
index 56f73bb0e6f66c7dec9055d2c22f0ac5f2f5e706..d4f2f9ba0fc59657311c012892a774c8ec2e08ad 100644 (file)
--- 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",