mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-30 20:01:40 +09:00
Update
This commit is contained in:
36
PHI-EN/migrations/1.1.9.json
Normal file
36
PHI-EN/migrations/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"]
|
||||
]
|
||||
}
|
||||
19
PHI-EN/migrations/migrations.lua
Normal file
19
PHI-EN/migrations/migrations.lua
Normal 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
|
||||
Reference in New Issue
Block a user