mirror of
https://github.com/Xevion/project-cybersyn.git
synced 2025-12-09 08:08:31 -06:00
moved migration logic into manager
This commit is contained in:
@@ -4,6 +4,7 @@ Date: 2023-4-30
|
||||
Bugfixes:
|
||||
- Fixed UPS spikes in Space Exploration related to expensive remote calls into their modding interface.
|
||||
- Fixed missing cybersyn manager translation key.
|
||||
- Added a fix for a crash related to using the beta branch of cybersyn
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.2.14
|
||||
Date: 2023-4-30
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
--- It is used in migrations.lua to determine if any migrations need to be run for beta testers.
|
||||
--- It is expected these are only meaningful between releases during beta testing.
|
||||
--- It should be set to nil for any release version.
|
||||
return 2
|
||||
return nil
|
||||
|
||||
@@ -147,7 +147,14 @@ end
|
||||
|
||||
|
||||
function manager_gui.on_migration()
|
||||
init_items(global.manager)
|
||||
if global.manager then
|
||||
for i, v in pairs(global.manager.players) do
|
||||
manager_gui.reset_player(i, v)
|
||||
end
|
||||
init_items(global.manager)
|
||||
else
|
||||
manager_gui.on_init()
|
||||
end
|
||||
end
|
||||
|
||||
function manager_gui.on_init()
|
||||
|
||||
@@ -328,19 +328,6 @@ function on_config_changed(data)
|
||||
global.tick_data = {}
|
||||
global.perf_cache = {}
|
||||
|
||||
if global.manager then
|
||||
for i, v in pairs(global.manager.players) do
|
||||
manager_gui.reset_player(i, v)
|
||||
end
|
||||
else
|
||||
global.manager = {
|
||||
players = {},
|
||||
}
|
||||
for i, v in pairs(game.players) do
|
||||
manager_gui.on_player_created({player_index = i})
|
||||
end
|
||||
end
|
||||
|
||||
flib_migration.on_config_changed(data, migrations_table)
|
||||
|
||||
IS_SE_PRESENT = remote.interfaces["space-exploration"] ~= nil
|
||||
|
||||
Reference in New Issue
Block a user