From ef384bca752f09fc416eea8308ab71408ab4b890 Mon Sep 17 00:00:00 2001 From: notnotmelon Date: Mon, 18 Nov 2024 13:54:26 -0600 Subject: [PATCH] Fixed a crash when clicking on the "Unavaliable" button in the fish TURD while dousing pumps is selected. --- changelog.txt | 1 + scripts/turd/turd.lua | 2 ++ 2 files changed, 3 insertions(+) diff --git a/changelog.txt b/changelog.txt index 4a305e17..4ee71202 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Version: 3.0.24 Date: ? Changes: - Fixed digosaurs pywiki page missing [item=dried-meat] → 1 ore info. Resolves https://github.com/pyanodon/pybugreports/issues/725 + - Fixed a crash when clicking on the "Unavaliable" button in the fish TURD while dousing pumps is selected. --------------------------------------------------------------------------------------------------- Version: 3.0.23 Date: 2024-11-17 diff --git a/scripts/turd/turd.lua b/scripts/turd/turd.lua index 855b2941..d51d7c07 100644 --- a/scripts/turd/turd.lua +++ b/scripts/turd/turd.lua @@ -475,6 +475,8 @@ gui_events[defines.events.on_gui_click]["py_turd_confirm_button"] = function(eve return end + if element.caption[1] == "turd.unavailable" then return end + local turd_bonuses = storage.turd_bonuses[force_index] or {} storage.turd_bonuses[force_index] = turd_bonuses local selection = turd_bonuses[master_tech_name] or NOT_SELECTED