From 94477e5d980dd8f6dd660becc5edb35a360b6727 Mon Sep 17 00:00:00 2001 From: Luca_S Date: Mon, 4 May 2020 23:26:05 +0200 Subject: [PATCH] Add check that the slot is actually full --- milo/apis/storage.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milo/apis/storage.lua b/milo/apis/storage.lua index 143b801..aaa0811 100644 --- a/milo/apis/storage.lua +++ b/milo/apis/storage.lua @@ -378,7 +378,7 @@ function Storage:defrag(throttle) to = providers[i] elseif (to.lockedToThis == providers[i].lockedToThis) and providers[i].item.count < providers[i].item.maxCount then to = providers[i] - else + elseif providers[i].item.count == providers[i].item.maxCount then -- As this slot is already at maxCount, all the remaining ones will also be due to sorting -- If any of the remaining providers is locked that doesn't matter. We wouldn't have been able to push there anyways break