mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 02:55:22 +09:00
24 lines
807 B
Lua
24 lines
807 B
Lua
local items = require '__PHI-EN__/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 j=v.min, v.max, 1 do
|
|
if technologies['compound-energy-' .. j] ~= nil then
|
|
if technologies['compound-energy-' .. j].researched then
|
|
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
|
|
end
|