Clear empty slots from cache
This commit is contained in:
parent
33ac91e24b
commit
c71d207ee2
@ -74,6 +74,9 @@ function prototype:moveItemsTo(count, fromSlot, otherChest, toSlot)
|
||||
|
||||
local tx = self.peripheral.pushItems(peripheral.getName(otherChest.peripheral), fromSlot, count, toSlot)
|
||||
myStack.count = myStack.count - tx
|
||||
if myStack.count == 0 then
|
||||
self.slots[fromSlot] = nil
|
||||
end
|
||||
targetStack.count = targetStack.count + tx
|
||||
|
||||
return tx
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user