Skip to content

Commit

Permalink
More Changes Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nexela committed May 27, 2019
1 parent 5a81917 commit 04d1fc6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stdlib",
"version": "1.0.6",
"version": "1.0.7",
"factorio_version": "0.17",
"title": "Factorio Standard Library",
"author": "Afforess",
Expand Down
6 changes: 4 additions & 2 deletions stdlib/event/changes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,17 @@ function Changes.on_mod_changed(this_mod_changes)

local old = this_mod_changes.old_version
if old then -- Find the last installed version
local vers = {}
for _, path in pairs(Changes.mod_versions) do
for ver, func in pairs(path) do
if not global._changes[ver] then
run_if_exists(func)
global._changes[ver] = old
vers[ver] = this_mod_changes.new_version
func()
log('Migration completed for version ' .. ver)
end
end
end
table.each(vers, function(v, k) global._changes[k] = v end)
end
end

Expand Down

0 comments on commit 04d1fc6

Please sign in to comment.