This commit is contained in:
2024-11-01 20:52:59 +09:00
parent 587f513be0
commit 11f7a23859
2 changed files with 9 additions and 5 deletions

View File

@@ -696,9 +696,7 @@ if settings.startup['PHI-CT'].value then
if mods['quality'] then if mods['quality'] then
for _, v in pairs(data.raw['module']) do for _, v in pairs(data.raw['module']) do
if v.category and v.category == 'quality' then if v.category and v.category == 'quality' then
for _, v2 in pairs(v.effect) do v.effect.quality = v.effect.quality * 4
v2 = v2 * 4
end
end end
end end
end end

View File

@@ -36,7 +36,7 @@ function main.EEE(source, tier)
item.next_upgrade = source.name .. '-' .. (tier + 1) item.next_upgrade = source.name .. '-' .. (tier + 1)
end 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 if item[v] then
item[v] = tonumber(string.match(item[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. (string.match(item[v], '%a+') or '') item[v] = tonumber(string.match(item[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. (string.match(item[v], '%a+') or '')
end end
@@ -107,8 +107,14 @@ function main.EEE(source, tier)
end end
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 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 elseif (source.type == 'boiler') then
item.energy_consumption = tostring(tonumber(string.match(item.energy_consumption, '[%d%.]+')) * tier) .. string.match(item.energy_consumption, '%a+') item.energy_consumption = tostring(tonumber(string.match(item.energy_consumption, '[%d%.]+')) * tier) .. string.match(item.energy_consumption, '%a+')