From 02421b95391519111a9cd6edb7f0d9019731cf1e Mon Sep 17 00:00:00 2001 From: osmarks Date: Wed, 15 Aug 2018 17:39:57 +0100 Subject: [PATCH] avoid endless back/forth stacks --- IO.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IO.lua b/IO.lua index 41bc9b1..2b44b71 100644 --- a/IO.lua +++ b/IO.lua @@ -40,7 +40,7 @@ while true do for slot, item in pairs(stacks_stored) do local ii = w.get_internal_identifier(item) local stored = get_item_count(ii) - local wanted = conf.items[ii] or 0 + local wanted = conf.items[ii] + 1 or 0 if (get_num_stacks(stored) * 64) >= wanted then -- if item is not in want list or we have too many, send it back to storage local result = w.unwrap(w.query_by_type("storage", { type = "insert",