From 11f7a23859b5397a077e643afd5ffdfa9bbf4790 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Fri, 1 Nov 2024 20:52:59 +0900 Subject: [PATCH] . --- PHI-CL/data.lua | 4 +--- PHI-CL/main.lua | 10 ++++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/PHI-CL/data.lua b/PHI-CL/data.lua index 8437c4d..ffa3fc9 100644 --- a/PHI-CL/data.lua +++ b/PHI-CL/data.lua @@ -696,9 +696,7 @@ if settings.startup['PHI-CT'].value then if mods['quality'] then for _, v in pairs(data.raw['module']) do if v.category and v.category == 'quality' then - for _, v2 in pairs(v.effect) do - v2 = v2 * 4 - end + v.effect.quality = v.effect.quality * 4 end end end diff --git a/PHI-CL/main.lua b/PHI-CL/main.lua index 05d9b5d..e7f307d 100644 --- a/PHI-CL/main.lua +++ b/PHI-CL/main.lua @@ -36,7 +36,7 @@ function main.EEE(source, tier) item.next_upgrade = source.name .. '-' .. (tier + 1) end - for _, v in pairs({'energy_usage', 'heating_energy', 'crane_energy_usage', 'energy_per_shot'}) do + for _, v in pairs({'production', 'energy_usage', 'heating_energy', 'crane_energy_usage', 'energy_per_shot'}) do if item[v] then item[v] = tonumber(string.match(item[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. (string.match(item[v], '%a+') or '') end @@ -107,8 +107,14 @@ function main.EEE(source, tier) end end + for _, v in pairs({'buffer_capacity', 'input_flow_limit', 'output_flow_limit'}) do + if item.energy_source[v] then + item.energy_source[v] = tonumber(string.match(item.energy_source[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. string.match(item.energy_source[v], '%a+') + end + end + elseif (source.type == 'solar-panel') then - item.production = tostring(tonumber(string.match(item.production, '[%d%.]+')) * (4 ^ (tier - source.min + 1))) .. string.match(item.production, '%a+') + item.production = tostring(tonumber(string.match(item.production, '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item.production, '%a+') elseif (source.type == 'boiler') then item.energy_consumption = tostring(tonumber(string.match(item.energy_consumption, '[%d%.]+')) * tier) .. string.match(item.energy_consumption, '%a+')