From fc59537468f474bf745af9b7fd9f54bfc621bcd7 Mon Sep 17 00:00:00 2001 From: osmarks Date: Mon, 13 Aug 2018 13:36:08 +0100 Subject: [PATCH] Change stuff round slightly to maybe work better --- client.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client.lua b/client.lua index 01c0770..2cc45e0 100644 --- a/client.lua +++ b/client.lua @@ -55,7 +55,7 @@ local commands = { }), "searching for items") for _, item_type in pairs(items) do - repeat + while quantity > 0 and item_type.count > 0 do local max_quantity if quantity < 64 then max_quantity = quantity end local moved = w.unwrap(w.query_by_type("storage", { @@ -68,7 +68,7 @@ local commands = { }), "extracting a stack").moved quantity = quantity - moved item_type.count = item_type.count - moved - until quantity == 0 or item_type.count == 0 + end end end, dump = function(slot)