mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-30 12:01:39 +09:00
.
This commit is contained in:
28
OLD/PHI-EQ/migrations/migrations.lua
Normal file
28
OLD/PHI-EQ/migrations/migrations.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
local items = require '__PHI-EQ__/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
|
||||
if technologies[v.tech] ~= nil then
|
||||
if technologies[v.tech].researched then
|
||||
for j=v.min, v.max, 1 do
|
||||
if recipes[v.name .. '-mk' .. j .. '-equipment'] ~= nil then
|
||||
recipes[v.name .. '-mk' .. j .. '-equipment'].enabled = true
|
||||
recipes[v.name .. '-mk' .. j .. '-equipment'].reload()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if technologies['power-armor-mk2'].researched then
|
||||
recipes['power-armor-mk3'].enabled = true
|
||||
recipes['power-armor-mk3'].reload()
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user