summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-04-02 03:02:29 +0100
committerubq323 <ubq323@ubq323.website>2024-04-02 03:02:29 +0100
commit23c19dd66eeb5d636365d10c58dfbd5ec22f944a (patch)
tree4a505fe20a88c784189cddd65e953768479c35d6
parentd1e93942b63052d30b9f2c8f63c8773bc72dcb6b (diff)
launch beescroll
-rw-r--r--beescroll.lua21
1 files changed, 18 insertions, 3 deletions
diff --git a/beescroll.lua b/beescroll.lua
index aca7916..8257081 100644
--- a/beescroll.lua
+++ b/beescroll.lua
@@ -69,13 +69,28 @@ local function slow_write(m,s)
end
end
+local function slow_write_f(m, t)
+ for _,val in ipairs(t) do
+ if type(val) == "string" then
+ slow_write(m,val)
+ else
+ m.setTextColor(val)
+ end
+ end
+end
+
+local norm_color = colors.gray
+
while true do
local x = math.random(0,99999)
m.scroll(1)
m.setCursorPos(1,H)
- slow_write(m, ("%5d bees have been %s in %s."):format(
- x, choice(verbs), choice(cities)
- ))
+ slow_write_f(mon, {
+ colors.white, string.format("%5d",math.random(0,99999)),
+ norm_color, " bees ", choice{"have been ","were "},
+ colors.lime, choice(verbs),
+ norm_color, " in ", colors.lightBlue, choice(cities),
+ norm_color, "."})
os.sleep(1)
end