Improving output of menril-deployers.lua master
authorOlav Bakke Svendsen <mail@olavbs.no>
Fri, 13 Dec 2024 03:08:22 +0000 (04:08 +0100)
committerOlav Bakke Svendsen <mail@olavbs.no>
Fri, 13 Dec 2024 03:08:22 +0000 (04:08 +0100)
menril-deployers/menril-deployers.lua

index e4e3451f92191d5bc0a49b4be3994e83b74408bf..d0aba5df73ad085a74bb79af114b5049a44e61bc 100644 (file)
@@ -49,11 +49,20 @@ local restock_deployers = function()
   return skip
 end
 
   return skip
 end
 
+local spinner_chars = "-\\|/"
+
+local spinner = function()
+  local _, _, c, cs = string.find(spinner_chars, "^(.)(.*)$")
+  spinner_chars = cs .. c
+  return c
+end
+
 while true do
   term.clear()
   term.setCursorPos(1,1)
   term.setTextColor(colors.gray)
 while true do
   term.clear()
   term.setCursorPos(1,1)
   term.setTextColor(colors.gray)
-  print("restocking deployers")
+  print("automatic sapling restocking ["..spinner().."]")
+  print(tostring(#ds).." deployer(s) connected")
   print("warnings:")
   term.setTextColor(colors.white)
   local e = restock_deployers()
   print("warnings:")
   term.setTextColor(colors.white)
   local e = restock_deployers()