Track newly non-blank stacks for targets of transfers

This commit is contained in:
Gabriel Tofvesson 2025-05-15 02:34:20 +02:00
parent 7546a61ae3
commit c9ac64d6c5

View File

@ -77,7 +77,12 @@ function prototype:moveItemsTo(count, fromSlot, otherChest, toSlot)
if myStack.count == 0 then if myStack.count == 0 then
self.slots[fromSlot] = nil self.slots[fromSlot] = nil
end end
targetStack.count = targetStack.count + tx targetStack.count = targetStack.count + tx
if targetStack:isBlank() then
targetStack.item = myStack.item
otherChest.slots[toSlot] = targetStack
end
return tx return tx
end end