mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
36
PHI-CL/migrations/PHI-EN_1.1.9.json
Normal file
36
PHI-CL/migrations/PHI-EN_1.1.9.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"entity":
|
||||
[
|
||||
["solar-panel-mk2", "solar-panel-2"],
|
||||
["solar-panel-mk3", "solar-panel-3"],
|
||||
["solar-panel-mk4", "solar-panel-4"],
|
||||
["solar-panel-mk5", "solar-panel-5"],
|
||||
["solar-panel-mk6", "solar-panel-6"],
|
||||
["solar-panel-mk7", "solar-panel-7"],
|
||||
["solar-panel-mk8", "solar-panel-8"],
|
||||
["accumulator-mk2", "accumulator-2"],
|
||||
["accumulator-mk3", "accumulator-3"],
|
||||
["accumulator-mk4", "accumulator-4"],
|
||||
["accumulator-mk5", "accumulator-5"],
|
||||
["accumulator-mk6", "accumulator-6"],
|
||||
["accumulator-mk7", "accumulator-7"],
|
||||
["accumulator-mk8", "accumulator-8"]
|
||||
],
|
||||
"item":
|
||||
[
|
||||
["solar-panel-mk2", "solar-panel-2"],
|
||||
["solar-panel-mk3", "solar-panel-3"],
|
||||
["solar-panel-mk4", "solar-panel-4"],
|
||||
["solar-panel-mk5", "solar-panel-5"],
|
||||
["solar-panel-mk6", "solar-panel-6"],
|
||||
["solar-panel-mk7", "solar-panel-7"],
|
||||
["solar-panel-mk8", "solar-panel-8"],
|
||||
["accumulator-mk2", "accumulator-2"],
|
||||
["accumulator-mk3", "accumulator-3"],
|
||||
["accumulator-mk4", "accumulator-4"],
|
||||
["accumulator-mk5", "accumulator-5"],
|
||||
["accumulator-mk6", "accumulator-6"],
|
||||
["accumulator-mk7", "accumulator-7"],
|
||||
["accumulator-mk8", "accumulator-8"]
|
||||
]
|
||||
}
|
||||
23
PHI-CL/migrations/migrations.lua
Normal file
23
PHI-CL/migrations/migrations.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
Reference in New Issue
Block a user