summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrebecca <ubq323@ubq323.website>2026-03-01 09:24:01 +0000
committerrebecca <ubq323@ubq323.website>2026-03-01 09:24:01 +0000
commit9f63f92b5a85a2de67a86a6a84012ffa5f1c9576 (patch)
treeee512f948c2d2c633f01d7b762928034afa8f0bb
parentdf9b82d44ed0cd1f3c0bf95a388683e777f6563f (diff)
beescroll
-rw-r--r--beescroll.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/beescroll.lua b/beescroll.lua
index fd350a7..5ac1c20 100644
--- a/beescroll.lua
+++ b/beescroll.lua
@@ -115,17 +115,20 @@ local function regular_item()
choice(cities),
norm_color, "."}
end
+
+local function some_item()
+ if math.random()<0.05 then return news_item() else return regular_item() end
+end
+
for _ = 1,H do
m.scroll(1)
m.setCursorPos(1,H)
- f_write(m,news_item(), false)
+ f_write(m,some_item(), false)
end
while true do
m.scroll(1)
m.setCursorPos(1,H)
- local it
- if math.random()<0.05 then it = news_item() else it = regular_item() end
- f_write(m, it, true)
+ f_write(m, some_item(), true)
os.sleep(math.random(5,100)/10)
end