From ed4f44fc9d08510819c79ab0f7ec6e436c844edb Mon Sep 17 00:00:00 2001 From: Emerson Rosen-Jones Date: Fri, 26 Dec 2025 23:04:33 -0500 Subject: [PATCH 1/2] fix: remove syntax error --- stock-manager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock-manager.lua b/stock-manager.lua index e912b81..520b9bc 100644 --- a/stock-manager.lua +++ b/stock-manager.lua @@ -18,7 +18,7 @@ local SLEEP_T = 10 function remove_waste(source, discard_rest) local amounts_to_keep = KEEP_ONLY local discard = function (item, amt, dest) - peripheral.call(source, "requestFiltered", dest + peripheral.call(source, "requestFiltered", dest, { name = item.name, _requestCount = amt, From 23c8afe8ee8fe9f73cf10c4eecd2778b72d5fc05 Mon Sep 17 00:00:00 2001 From: Emerson Rosen-Jones Date: Fri, 26 Dec 2025 23:05:09 -0500 Subject: [PATCH 2/2] fix: keep config static --- stock-manager.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/stock-manager.lua b/stock-manager.lua index 520b9bc..43ef4c8 100644 --- a/stock-manager.lua +++ b/stock-manager.lua @@ -29,10 +29,7 @@ function remove_waste(source, discard_rest) if amounts_to_keep[item.name] ~= nil then local excess = item.count - amounts_to_keep[item.name][1] if excess > 0 then - amounts_to_keep[item.name][1] = 0 discard(item, excess, amounts_to_keep[item.name][2]) - else - amounts_to_keep[item.name][1] = -excess end elseif DISCARD_REST then discard(item, amt, DISCARD_ADDR)