feat: implement new request_more
This commit is contained in:
parent
9b17cd22fe
commit
c7257114ef
1 changed files with 10 additions and 3 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
local INVENTORY = "left"
|
local INVENTORY = "left"
|
||||||
local MAIN_TICKER = ""
|
local MAIN_TICKER = ""
|
||||||
local REQUEST_TICKER = ""
|
local REQUEST_TICKER = ""
|
||||||
|
local STORAGE_ADDRESS = ""
|
||||||
local SLEEP_TIME = 30
|
local SLEEP_TIME = 30
|
||||||
local NUGGET_RATIO = 63 -- amount of nuggets per craft
|
local NUGGET_RATIO = 63 -- amount of nuggets per craft
|
||||||
local BLOCK_RATIO = 7 -- amount of blocks per craft
|
local BLOCK_RATIO = 7 -- amount of blocks per craft
|
||||||
|
|
@ -65,8 +66,14 @@ function execute_crafts (item_type, crafts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function request_more (item_type, amt)
|
function request_more (ticker, item_type)
|
||||||
-- TODO
|
local request = {
|
||||||
|
name = {
|
||||||
|
_op = "regex",
|
||||||
|
value = ".*:" .. item_type .. "_nugget"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ticker.requestFiltered(STORAGE_ADDRESS, request)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- logic
|
-- logic
|
||||||
|
|
@ -174,7 +181,7 @@ while true do
|
||||||
else
|
else
|
||||||
-- TODO
|
-- TODO
|
||||||
-- TODO potentially keep requesting until above MAX_NUM
|
-- TODO potentially keep requesting until above MAX_NUM
|
||||||
request_more(item_type, amt)
|
request_more(main_inv, item_type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue