feat: add speedometer function
This commit is contained in:
parent
656c6f88ba
commit
7d9970d384
1 changed files with 5 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
local STOCK_TICKER = ""
|
||||
local EXPORT_STORAGE = ""
|
||||
local SPEEDOMETER = ""
|
||||
|
||||
local CRUSHER_ADDR = "Crusher"
|
||||
local MELTER_ADDR = "Melter"
|
||||
|
|
@ -199,6 +200,10 @@ function export (ticker, item, amt)
|
|||
end
|
||||
|
||||
function run (ticker, export_storage, current_modes)
|
||||
if SPEEDOMETER ~= "" and peripheral.call(SPEEDOMETER, "getSpeed") == 0 then
|
||||
os.sleep(SLEEP_T)
|
||||
return run (ticker, export_storage, current_modes)
|
||||
end
|
||||
cycleItems(ticker)
|
||||
updateModes(ticker, current_modes)
|
||||
local export_amounts = getAmounts(export_storage.list)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue