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