From bfe737f39d5164a922862bd7d73d6c1077a2dbf9 Mon Sep 17 00:00:00 2001 From: Hans van Luttikhuizen-Ross Date: Thu, 5 Dec 2024 15:35:52 +0100 Subject: [PATCH 1/3] Fix crash when deleting a surface with Nixie Tubes on it --- scripts/nixie_tube.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/nixie_tube.lua b/scripts/nixie_tube.lua index 6d63df9..ecd3713 100644 --- a/scripts/nixie_tube.lua +++ b/scripts/nixie_tube.lua @@ -416,7 +416,12 @@ local function on_tick(_) storage.next_controller_unit_number, controller = next(storage.controllers) end - -- If no player is able to see Nixie Tubes on this surface, skip the update + if not controller.entity.valid then + reconfigure_nixie_tubes() + break + end + + -- If no player is abl see Nixie Tubes on this surface, skip the update if eyes_on_surface[controller.entity.surface_index] then update_controller(controller) end From b073205900e2c7da152bf061fb8b602caf9d31cd Mon Sep 17 00:00:00 2001 From: Hans van Luttikhuizen-Ross Date: Thu, 5 Dec 2024 15:36:04 +0100 Subject: [PATCH 2/3] Fix crash when removing a Nixie Tube from a space platform --- scripts/nixie_tube.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/nixie_tube.lua b/scripts/nixie_tube.lua index ecd3713..f04c442 100644 --- a/scripts/nixie_tube.lua +++ b/scripts/nixie_tube.lua @@ -559,6 +559,7 @@ local nixie_tube = { [defines.events.on_entity_died] = on_object_destroyed, [defines.events.on_player_mined_entity] = on_object_destroyed, [defines.events.on_robot_mined_entity] = on_object_destroyed, + [defines.events.on_space_platform_mined_entity] = on_object_destroyed, [defines.events.script_raised_destroy] = on_object_destroyed, } } From ad54f9a23613c85459b971f361a4960a6e63e1f3 Mon Sep 17 00:00:00 2001 From: Hans van Luttikhuizen-Ross Date: Thu, 5 Dec 2024 15:38:56 +0100 Subject: [PATCH 3/3] Update version number and change log --- changelog.txt | 6 ++++++ info.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index d3a6d10..2b77f7e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,10 @@ --------------------------------------------------------------------------------------------------- +Version: 0.2.7 +Date: 2024-12-05 + Bugfixes: + - Fix crash when removing a Nixie Tube from a space platform + - Fix crash when deleting a surface with Nixie Tubes on it +--------------------------------------------------------------------------------------------------- Version: 0.2.6 Date: 2024-11-29 Bugfixes: diff --git a/info.json b/info.json index 779e08b..96a5fb2 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "UPSFriendlyNixieTubeDisplay", - "version": "0.2.6", + "version": "0.2.7", "factorio_version": "2.0", "title": "UPS Friendly Nixie Tubes", "author": "Red_Wizard, pindab0ter",