This commit is contained in:
2023-05-09 01:25:30 +09:00
parent dc2df1bc08
commit 4a7bdb1ce3
10 changed files with 279 additions and 202 deletions

View File

@@ -0,0 +1,19 @@
local items = require '../config'
for _, force in pairs(game.forces) do
local technologies = force.technologies
local recipes = force.recipes
for _, v in pairs(items) do
if v.enabled then
for j=v.min, v.max, 1 do
if technologies['compound-energy-' .. j] ~= nil then
if technologies['compound-energy-' .. j].researched then
recipes[v.name .. '-' .. j].enabled = true
recipes[v.name .. '-' .. j].reload()
end
end
end
end
end
end