feat: add speedometer function

This commit is contained in:
Emerson Rosen-Jones 2026-01-02 23:14:51 -05:00
parent 656c6f88ba
commit 7d9970d384

View file

@ -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)