Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/metas/technology.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading