From 00e21c8eca9d122e89ae80582dcf3ce9dacf9c4d Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Mon, 27 Jan 2025 23:18:18 +0900 Subject: [PATCH] . --- PHI-CL/config.lua | 2 +- PHI-CL/data.lua | 44 ++++++++++++++++++++------------------------ 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/PHI-CL/config.lua b/PHI-CL/config.lua index 2ebe2e7..2f339a4 100644 --- a/PHI-CL/config.lua +++ b/PHI-CL/config.lua @@ -356,7 +356,7 @@ local items = { graphics_name = 'solar-panel-equipment' } }, - ['item-productivity'] = { + ['item_productivity'] = { ['solar-panel'] = 'solar-energy', ['accumulator'] = 'electric-energy-accumulators', ['landfill'] = 'landfill', diff --git a/PHI-CL/data.lua b/PHI-CL/data.lua index e4b5a3a..122e5bd 100644 --- a/PHI-CL/data.lua +++ b/PHI-CL/data.lua @@ -334,32 +334,28 @@ if settings.startup['PHI-MI'].value then end if settings.startup['PHI-MI-PRODUCTIVITY'].value then - local function add_prod_tech(name, tech) - data:extend({{ - type = 'technology', - name = name .. '-productivity', - prerequisites = tech, - effects = { - { - type = 'change-recipe-productivity', - recipe = name, - change = 0.1 - } - }, - unit = { - count_formula = '(1.5^L)*1000', - ingredients = table.deepcopy(data.raw.technology[tech].unit.ingredients), - time = data.raw.technology[tech].unit.time - }, - icon = data.raw.technology[tech].icon, - max_level = 'infinite', - upgrade = true - }}) - end - for k, v in pairs(items.item_productivity) do if data.raw.technology[v] then - add_prod_tech(k, v) + data:extend({{ + type = 'technology', + name = k .. '-productivity', + prerequisites = tech, + effects = { + { + type = 'change-recipe-productivity', + recipe = k, + change = 0.1 + } + }, + unit = { + count_formula = '(1.5^L)*1000', + ingredients = table.deepcopy(data.raw.technology[v].unit.ingredients), + time = data.raw.technology[v].unit.time + }, + icon = data.raw.technology[v].icon, + max_level = 'infinite', + upgrade = true + }}) end end end