Add missing breaks to try move item
This commit is contained in:
@@ -130,6 +130,7 @@ local function tryMoveItem(item, itemTree, force)
|
|||||||
true)
|
true)
|
||||||
if moved then
|
if moved then
|
||||||
itemLocation.maxFits = itemLocation.inventory.HowManyCanBePut(item.Prefab, itemLocation.slotIndex)
|
itemLocation.maxFits = itemLocation.inventory.HowManyCanBePut(item.Prefab, itemLocation.slotIndex)
|
||||||
|
break
|
||||||
end
|
end
|
||||||
-- if moved then
|
-- if moved then
|
||||||
-- MyModGlobal.debugPrint(string.format("Moved item to existing stack at slot index: %d", itemLocation .slotIndex))
|
-- MyModGlobal.debugPrint(string.format("Moved item to existing stack at slot index: %d", itemLocation .slotIndex))
|
||||||
@@ -163,6 +164,7 @@ local function tryMoveItem(item, itemTree, force)
|
|||||||
true)
|
true)
|
||||||
if moved then
|
if moved then
|
||||||
itemLocation.maxFits = itemLocation.inventory.HowManyCanBePut(item.Prefab, itemLocation.slotIndex)
|
itemLocation.maxFits = itemLocation.inventory.HowManyCanBePut(item.Prefab, itemLocation.slotIndex)
|
||||||
|
break
|
||||||
end
|
end
|
||||||
-- if moved then
|
-- if moved then
|
||||||
-- MyModGlobal.debugPrint(string.format("Moved item to empty slot at index: %d", itemLocation.slotIndex))
|
-- MyModGlobal.debugPrint(string.format("Moved item to empty slot at index: %d", itemLocation.slotIndex))
|
||||||
|
Reference in New Issue
Block a user