This commit is contained in:
2024-06-17 01:30:58 +09:00
parent d038db3e15
commit d1579e9a31
12 changed files with 2268 additions and 59 deletions

View File

@@ -1,12 +1,12 @@
local items = require '__PHI-EN__/config'
local items = require '__PHI-CL__/config'
for _, force in pairs(game.forces) do
local technologies = force.technologies
local recipes = force.recipes
for k, v in pairs(items) do
if k ~= 'setting' then
if v.enabled then
for _, v in pairs(items['item']) do
if v.enabled then
if (v.type == 'solar-panel') or (v.type == 'accumulator') or (v.type == 'boiler') or (v.type == 'steam-engine') or (v.type == 'nuclear-reactor') or (v.type == 'heat-pipe') or (v.type == 'heat-exchanger') or (v.type == 'steam-turbine') then
for j=v.min, v.max, 1 do
if technologies['compound-energy-' .. j] ~= nil then
if technologies['compound-energy-' .. j].researched then
@@ -17,6 +17,17 @@ for _, force in pairs(game.forces) do
end
end
end
else
if technologies[v.tech] then
if technologies[v.tech].researched then
for j=v.min, v.max, 1 do
if recipes[v.name .. '-' .. j] ~= nil then
recipes[v.name .. '-' .. j].enabled = true
recipes[v.name .. '-' .. j].reload()
end
end
end
end
end
end
end