From 973e9af197e4de2c500c8235a4c91de456981ddc Mon Sep 17 00:00:00 2001 From: protocol_1903 <67478786+protocol-1903@users.noreply.github.com> Date: Sun, 24 May 2026 12:36:41 -0700 Subject: [PATCH] Fixed that TECHNOLOGY:replace_prereq would not properly function --- changelog.txt | 1 + lib/metas/technology.lua | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 6309f81..41282bf 100644 --- a/changelog.txt +++ b/changelog.txt @@ -16,6 +16,7 @@ Date: ??? - Added py.find_latest_undo_action to find the latest undo action referencing a supplied entity - Fixed that reproductive complex had extremely small alt-mode icons. Resolves https://github.com/pyanodon/pybugreports/issues/1377 - Added py.transfer_stack, py.transfer_stack_to_cursor, py.transfer_cursor_to_stack, and py.transfer_inventory_items + - Fixed that TECHNOLOGY:replace_prereq would not properly function --------------------------------------------------------------------------------------------------- Version: 3.0.41 Date: 2025-12-28 diff --git a/lib/metas/technology.lua b/lib/metas/technology.lua index c3e60e6..2b01efd 100644 --- a/lib/metas/technology.lua +++ b/lib/metas/technology.lua @@ -81,9 +81,9 @@ end ---@return data.TechnologyPrototype self ---@return boolean success metas.replace_prereq = function(self, old, new) - local _, success = self.remove_prereq(old) + local _, success = self:remove_prereq(old) if success then - return self.add_prereq(new) -- conditional on success of add_prereq + return self:add_prereq(new) -- conditional on success of add_prereq else return self, false -- DNE, do not add end