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