From: Olav Bakke Svendsen Date: Thu, 12 Oct 2023 04:31:02 +0000 (+0200) Subject: Missing the timer event?? X-Git-Tag: stable-steam~22 X-Git-Url: http://git.olavbs.no/?a=commitdiff_plain;h=e6b476deeaec1cf781c322fbab74cfec84e68b55;p=cc.git Missing the timer event?? --- diff --git a/steam/temporary-coal-feeder.lua b/steam/temporary-coal-feeder.lua index af813c0..ca6176d 100644 --- a/steam/temporary-coal-feeder.lua +++ b/steam/temporary-coal-feeder.lua @@ -3,8 +3,8 @@ local refill_when = function(amt) return amt < 2 end local refill_amt = 2 -local main_monitor = peripheral.wrap("monitor_1") -local treefarm_monitor = peripheral.wrap("monitor_0") +local main_monitor = peripheral.wrap("monitor_3") +-- local treefarm_monitor = peripheral.wrap("monitor_0") local coal_barrels = {} for _,n in pairs({ "0", "1" }) do @@ -94,9 +94,11 @@ while true do treefarm_monitor.write(spinner()) elseif e[1] == "timer" and e[2] == main_timer then main_timer = os.startTimer(60) + os.cancelTimer(spinner_timer) local stock = balance_coal() print_stats(main_monitor, stock) feed(stock) + spinner_timer = os.startTimer(0) elseif e[1] == "timer" and e[2] == spinner_timer then spinner_timer = os.startTimer(0.5) local s = spinner()