Skip to content

Commit

Permalink
don't match items in unit inventories
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Sep 6, 2023
1 parent 16b7754 commit 4dfb75d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions internal/caravan/movegoods.lua
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,10 @@ local function is_tradeable_item(item, depot)
end
if item.flags.in_inventory then
local gref = dfhack.items.getGeneralRef(item, df.general_ref_type.CONTAINED_IN_ITEM)
if gref then
local container = df.item.find(gref.item_id)
if container and not df.item_binst:is_instance(container) then
return false
end
if not gref then return false end
local container = df.item.find(gref.item_id)
if not container or not df.item_binst:is_instance(container) then
return false
end
end
if item.flags.in_job then
Expand Down

0 comments on commit 4dfb75d

Please sign in to comment.