From 5c87be4d46fa88ce20a2178cff82e8429097cfcd Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Fri, 11 Jul 2025 03:49:11 +0900 Subject: [PATCH] . --- PHI-CL/control.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PHI-CL/control.lua b/PHI-CL/control.lua index 9865b31..15976e2 100644 --- a/PHI-CL/control.lua +++ b/PHI-CL/control.lua @@ -178,6 +178,7 @@ script.on_init(function() storage.phi_cl = { combinator = { + research_queue = {}, research_progress = 0 } } @@ -304,6 +305,15 @@ if settings.startup['PHI-MI'].value or (settings.startup['PHI-GM'].value and set script.on_nth_tick(1800, function(_) storage.phi_cl.combinator.research_progress = math.floor(game.forces['player'].research_progress * 100) + local n = 1 + + for _, r in pairs(game.forces['player'].research_queue) do + if r.name and r.level and r.research_unit_count_formula then + storage.phi_cl.combinator.research_queue_n[n] = ((storage.phi_cl.combinator.research_queue_n[n] and storage.phi_cl.combinator.research_queue_n[n]) or 0) + math.pow(2, n - 1) + end + + n = n + 1 + end for _, s in pairs(game.surfaces) do local c = s.find_entities_filtered{type = 'constant-combinator', name = 'super-combinator'}