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