From 0be62dbccc8a9367ae5614b6d173eafa0502c95e Mon Sep 17 00:00:00 2001 From: Emerson Rosen-Jones Date: Sat, 20 Dec 2025 22:02:37 -0500 Subject: [PATCH] feat: add error handling for unloaded peripherals Future work: cap the number of retries --- biofuel-manager.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/biofuel-manager.lua b/biofuel-manager.lua index 1bfa83e..a39c873 100644 --- a/biofuel-manager.lua +++ b/biofuel-manager.lua @@ -141,5 +141,10 @@ if arg ~= nil and arg[1] == "run" then local requester = peripheral.wrap(MAIN_REQUESTER) requester.setAddress(FACTORY_ADDRESS) local ticker = peripheral.wrap(SUBNET_TICKER) - run(requester, ticker) + local ran = false + while not ran do + ran, result = run(ticker, requester) + if not ran then print(result) end + os.sleep(SLEEP_T) + end end