From a09548ec11b59fd1719ce510ebf4f494a0b23289 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Thu, 16 Oct 2025 18:35:31 +0900 Subject: [PATCH] . --- PHI-CL/control.lua | 37 +++++++++++++++++-------------------- PHI-CL/data-updates.lua | 4 ++-- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/PHI-CL/control.lua b/PHI-CL/control.lua index cfdeb89..3f68d23 100644 --- a/PHI-CL/control.lua +++ b/PHI-CL/control.lua @@ -290,7 +290,7 @@ if settings.startup['PHI-MI'].value or (settings.startup['PHI-GM'].value and set end circuit_oc = circuit_oc.sections[1] - circuit_oc.set_slot(1, {value = {type = 'virtual', name = 'signal-SA', quality = 'normal'}, min = event.element.parent.parent['research_queue_table']['research_queue_dropdown'].selected_index}) + circuit_oc.set_slot(1, {value = {type = 'virtual', name = 'signal-SA', quality = 'normal'}, min = event.element.parent.parent['research_queue_table']['research_queue_dropdown'].selected_index - 1}) end end) @@ -387,7 +387,7 @@ script.on_nth_tick(10, function(event) local val = circuit_oc.get_slot(1).min or 0 if val == 1 or val == 3 then - -- read_type_technology_dropdown + -- research_queue_read local n = 11 for rn, rv in pairs(storage.phi_cl.combinator.research_queue) do @@ -403,35 +403,32 @@ script.on_nth_tick(10, function(event) circuit_oc.set_slot(18, {value = {type = 'virtual', name = 'signal-PA', quality = 'normal'}, min = storage.phi_cl.combinator.research_progress}) end - --[[ - if val == 2 or val == 3 then - -- incomplete - -- set_type_technology_dropdown + if val == 2 or val == 3 then + -- research_queue_write - storage.phi_cl.combinator.research_set_combinator_count = storage.phi_cl.combinator.research_set_combinator_count + 1 + storage.phi_cl.combinator.research_set_combinator_count = storage.phi_cl.combinator.research_set_combinator_count + 1 - if storage.phi_cl.combinator.research_set_combinator_count > 1 then - circuit_oc.set_slot(1, {value = {type = 'virtual', name = 'signal-SA', quality = 'normal'}, min = 1}) + if storage.phi_cl.combinator.research_set_combinator_count > 1 then + circuit_oc.set_slot(1, {value = {type = 'virtual', name = 'signal-SA', quality = 'normal'}, min = 1}) - else - local ls = sc.get_signals(defines.wire_connector_id.circuit_red, defines.wire_connector_id.circuit_green) + else + local ls = cs1.get_signals(defines.wire_connector_id.circuit_red, defines.wire_connector_id.circuit_green) - if ls and #ls > 0 then - for _, cs in pairs(ls) do - if cs.signal and cs.signal.type == 'virtual' and technology_signal[cs.signal.name] then - for i = 1, 7 do - if cs.count % (2 ^ (8 + i)) == 1 then - storage.phi_cl.combinator.research_queue_set[i] = technology_signal[cs.signal.name] - end + if ls and #ls > 0 then + for _, cs in pairs(ls) do + if cs.signal and cs.signal.type == 'virtual' and cs.signal.name then + for i = 1, 7 do + if cs.count % (2 ^ (8 + i)) == 1 then + storage.phi_cl.combinator.research_queue_set[i] = cs.signal.name:gsub('signal-', '') end end end end end end - ]] + end - -- game.forces['player'].research_queue = storage.phi_cl.combinator.research_queue_set + game.forces['player'].research_queue = storage.phi_cl.combinator.research_queue_set end end end) diff --git a/PHI-CL/data-updates.lua b/PHI-CL/data-updates.lua index c1b75f3..22fed17 100644 --- a/PHI-CL/data-updates.lua +++ b/PHI-CL/data-updates.lua @@ -46,11 +46,11 @@ if (settings.startup['PHI-MI'].value and settings.startup['PHI-MI-GENERIC'].valu if (v.max_level and v.max_level == 'infinite') and v.hidden ~= true then table.insert(s, { type = 'virtual-signal', - name = 'signal-' .. raw_name, + name = 'signal-' .. v.name, icon = (v.icon and v.icon) or (v.icons and v.icons[1].icon), icon_size = ((v.icons and v.icons[1].icon_size and v.icons[1].icon_size) or (v.icon_size and v.icon_size)) or 64, subgroup = 'pictographs', - order = 'z[technology]-[' .. raw_name .. ']', + order = 'z[technology]-[' .. v.name .. ']', localised_name = {'?', {'technology-name.' .. raw_name}, {'entity-name.' .. raw_name}} }) end