From 8aada386109f11685ce312e765b746d3878fcdb3 Mon Sep 17 00:00:00 2001 From: Olav Bakke Svendsen Date: Thu, 12 Oct 2023 07:37:37 +0200 Subject: [PATCH] Spinner symbols --- steam/temporary-coal-feeder.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/steam/temporary-coal-feeder.lua b/steam/temporary-coal-feeder.lua index 5b99379..98a727e 100644 --- a/steam/temporary-coal-feeder.lua +++ b/steam/temporary-coal-feeder.lua @@ -85,11 +85,11 @@ local spin = function() table.insert(spinner_chars, 1, c) return c end -local print_spinner = function(monitor, x, y, spinning) +local print_spinner = function(monitor, x, y, char) local s = spin() main_monitor.setTextColor(1) main_monitor.setCursorPos(29,12) - main_monitor.write(spinning and s or "*") + main_monitor.write(char or s) end local main_timer = os.startTimer(0) @@ -105,9 +105,10 @@ while true do elseif e[1] == "timer" and e[2] == main_timer then main_timer = os.startTimer(60) os.cancelTimer(spinner_timer) - print_spinner(main_monitor, 29,12, false) + print_spinner(main_monitor, 29,12, "?") local stock = balance_coal() print_stats(main_monitor, stock) + print_spinner(main_monitor, 29,12, "*") feed(stock) spinner_timer = os.startTimer(0) elseif e[1] == "timer" and e[2] == spinner_timer then -- 2.30.2