summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-04-02 04:19:23 +0100
committerubq323 <ubq323@ubq323.website>2024-04-02 04:19:23 +0100
commitc250b9cd16489ded75e84e55171b22e7a8e22f8b (patch)
tree4cefcf8e1d9e22edd3ca503882ec51d02522f86f
parent0c7841188a434942f0362a678451681877703600 (diff)
launch beescroll
-rw-r--r--beescroll.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/beescroll.lua b/beescroll.lua
index 858b1ac..ccc294c 100644
--- a/beescroll.lua
+++ b/beescroll.lua
@@ -84,7 +84,7 @@ local function news_item()
norm_color, " has ", choice {
-- the council has condemned all bees for [being/having been] boiled [illegally/without a permit/behind schedule]
{ "condemned ", beecount(), "for ", choice{"being","having been"}, " ", colors.blue, choice(verbs),
- norm_color, choice{"illegally","without a permit","behind schedule"} },
+ norm_color, " ", choice{"illegally","without a permit","behind schedule"} },
-- the council has decreed that 1234 bees shall be skewed by next tuesday
{ "decreed that ", beecount(), "shall be ", colors.orange, choice(verbs),
norm_color, " by ", timeframe() },
@@ -96,7 +96,7 @@ local function news_item()
-local function make_entry()
+local function regular_item()
return {
choice{colors.yellow, colors.red, colors.cyan},
string.format("%5d",math.random(0,99999)),
@@ -111,12 +111,14 @@ end
for _ = 1,H do
m.scroll(1)
m.setCursorPos(1,H)
- f_write(m,news_item(), false)
+ f_write(m,regular_item(), false)
end
while true do
m.scroll(1)
m.setCursorPos(1,H)
- f_write(m, news_item(), true)
+ local it
+ if math.random<0.05 then it = news_item() else it = regular_item() end
+ f_write(m, it, true)
os.sleep(math.random(5,100)/10)
end