From d6d229825d4c9a76b34806ff759cea0fa881a796 Mon Sep 17 00:00:00 2001 From: KiwiHawk <59639+KiwiHawk@users.noreply.github.com> Date: Sun, 16 Jun 2024 14:34:01 +1200 Subject: [PATCH] Fixed crash when upgrading blueprints #978 --- angelsrefining/changelog.txt | 1 + angelsrefining/src/sea-pump.lua | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/angelsrefining/changelog.txt b/angelsrefining/changelog.txt index 5b8bd96cf..7100403a9 100644 --- a/angelsrefining/changelog.txt +++ b/angelsrefining/changelog.txt @@ -3,6 +3,7 @@ Version: 0.12.8 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) Changes: - Added Ore Sorting Facility 5. Catalyst sorting requires a higher tier ore sorting facility (979) --------------------------------------------------------------------------------------------------- diff --git a/angelsrefining/src/sea-pump.lua b/angelsrefining/src/sea-pump.lua index f54b2ac9b..419b9c348 100644 --- a/angelsrefining/src/sea-pump.lua +++ b/angelsrefining/src/sea-pump.lua @@ -203,6 +203,11 @@ function sea_pump:on_blueprint_setup(player_index) end end + -- type may be 'upgrade-item' + if blueprint.type ~= 'blueprint' then + return + end + -- obtain all blueprint entitites local entities = blueprint.get_blueprint_entities() if entities == nil then