-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
corrected fix for crash when removing demo mod of #992
- Loading branch information
1 parent
477824c
commit daad898
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
local sea_pump = require("src.sea-pump") | ||
|
||
return function(configuration_data) | ||
local mod_changes = configuration_data.mod_changes["angelspump"] | ||
if mod_changes and mod_changes.new_version ~= (mod_changes.old_version or "") then | ||
log( | ||
string.format( | ||
"Updating angelspump from version %q to version %q", | ||
mod_changes.old_version or "nil", | ||
mod_changes.new_version | ||
) | ||
) | ||
|
||
-------------------------------------------------- | ||
-- Sea pump script----- -- | ||
-------------------------------------------------- | ||
if not global.SP_data then | ||
log("Updating sea pump from version 0 to latest version.") | ||
sea_pump:on_init() | ||
end | ||
|
||
if global.SP_data.version == 1 then | ||
log("Updating sea pump from version 1 to version 2.") | ||
global.SP_data["entity_modules_data_tag"] = "sea-pump-modules_request" -- the tag name where the data is stored in the entity | ||
global.SP_data.version = 2 | ||
end | ||
end | ||
end |