From c7257114efbc6c1b2964e4c0c6bb1ccac0f1fcc0 Mon Sep 17 00:00:00 2001 From: Emerson Rosen-Jones Date: Fri, 16 Jan 2026 22:01:46 -0500 Subject: [PATCH] feat: implement new request_more --- compacting-storage.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/compacting-storage.lua b/compacting-storage.lua index 07d9ca9..97481ec 100644 --- a/compacting-storage.lua +++ b/compacting-storage.lua @@ -9,6 +9,7 @@ local INVENTORY = "left" local MAIN_TICKER = "" local REQUEST_TICKER = "" +local STORAGE_ADDRESS = "" local SLEEP_TIME = 30 local NUGGET_RATIO = 63 -- amount of nuggets per craft local BLOCK_RATIO = 7 -- amount of blocks per craft @@ -65,8 +66,14 @@ function execute_crafts (item_type, crafts) end end -function request_more (item_type, amt) - -- TODO +function request_more (ticker, item_type) + local request = { + name = { + _op = "regex", + value = ".*:" .. item_type .. "_nugget" + } + } + ticker.requestFiltered(STORAGE_ADDRESS, request) end -- logic @@ -174,7 +181,7 @@ while true do else -- TODO -- TODO potentially keep requesting until above MAX_NUM - request_more(item_type, amt) + request_more(main_inv, item_type) end end