Mark parent inventory if slot is not an inventory
This commit is contained in:
@@ -126,15 +126,21 @@ local function setTargetInventory()
|
||||
end
|
||||
if not slot.items or #slot.items == 0 then
|
||||
MyModGlobal.debugPrint("Slot is empty")
|
||||
print(string.format("Setting target inventory to %s", tostring(itemInv)))
|
||||
targetInventory = itemInv
|
||||
return
|
||||
end
|
||||
local item = slot.items[1]
|
||||
if not item then
|
||||
MyModGlobal.debugPrint("Slot is empty")
|
||||
print(string.format("Setting target inventory to %s", tostring(itemInv)))
|
||||
targetInventory = itemInv
|
||||
return
|
||||
end
|
||||
if not item.OwnInventory then
|
||||
MyModGlobal.debugPrint("Item has no own inventory")
|
||||
print(string.format("Setting target inventory to %s", tostring(itemInv)))
|
||||
targetInventory = itemInv
|
||||
return
|
||||
end
|
||||
print(string.format("Setting target inventory to %s", tostring(item.OwnInventory)))
|
||||
|
||||
Reference in New Issue
Block a user