From f4516455137401f0f631e8f6963e1647ac23931e Mon Sep 17 00:00:00 2001 From: KiwiHawk <59639+KiwiHawk@users.noreply.github.com> Date: Sun, 16 Jun 2024 14:41:31 +1200 Subject: [PATCH] Crash after removing angelspump mod #992 Deleting code that would only ever run when removing a test mod --- angelsrefining/changelog.txt | 1 + angelsrefining/control.lua | 2 -- angelsrefining/src/mod-config.lua | 23 ----------------------- 3 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 angelsrefining/src/mod-config.lua diff --git a/angelsrefining/changelog.txt b/angelsrefining/changelog.txt index 7100403a9..aa6627da8 100644 --- a/angelsrefining/changelog.txt +++ b/angelsrefining/changelog.txt @@ -4,6 +4,7 @@ Date: ??? Bugfixes: - Fixed when placing an electric offshore waterpump over its ghost, the module request would be forgotten (973) - Fixed crash when upgrading blueprints (978) + - Fixed crash when removing 'angelspump' mod (test mod, merged into Angel's Refining) (992) Changes: - Added Ore Sorting Facility 5. Catalyst sorting requires a higher tier ore sorting facility (979) --------------------------------------------------------------------------------------------------- diff --git a/angelsrefining/control.lua b/angelsrefining/control.lua index 2b6457ec5..9645248bd 100644 --- a/angelsrefining/control.lua +++ b/angelsrefining/control.lua @@ -4,8 +4,6 @@ local ground_water_pump = require("src.ground_water_pump") local sea_pump = require("src.sea-pump") -- initialisation -local on_configuration_changed = require("src.mod-config") -script.on_configuration_changed(on_configuration_changed) script.on_init(function() starting_items:on_init() sea_pump:on_init() diff --git a/angelsrefining/src/mod-config.lua b/angelsrefining/src/mod-config.lua deleted file mode 100644 index cbb447d7e..000000000 --- a/angelsrefining/src/mod-config.lua +++ /dev/null @@ -1,23 +0,0 @@ -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 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