summaryrefslogtreecommitdiff
path: root/beescroll.lua
diff options
context:
space:
mode:
Diffstat (limited to 'beescroll.lua')
-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