summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/test
diff options
context:
space:
mode:
authorDarshan Shaligram <dshaligram@users.sourceforge.net>2009-09-25 06:03:17 +0530
committerDarshan Shaligram <dshaligram@users.sourceforge.net>2009-09-25 06:03:17 +0530
commit1a1e5b15acae198316789089465a9b5c35826127 (patch)
tree0b382ad59172b2fd546d707b4349b63409015aae /crawl-ref/source/test
parent3dd0550373193e8ae2c868c8bd24679b929bd52d (diff)
downloadcrawl-ref-1a1e5b15acae198316789089465a9b5c35826127.tar.gz
crawl-ref-1a1e5b15acae198316789089465a9b5c35826127.zip
Reduce LOS test iterations, flush messages periodically to avoid -more- prompts.
Diffstat (limited to 'crawl-ref/source/test')
-rw-r--r--crawl-ref/source/test/los.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/crawl-ref/source/test/los.lua b/crawl-ref/source/test/los.lua
index 6ff3a092a4..9a68847266 100644
--- a/crawl-ref/source/test/los.lua
+++ b/crawl-ref/source/test/los.lua
@@ -4,17 +4,15 @@ local FAILMAP = 'losfail.map'
local checks = 0
local function test_los()
+ -- Clear messages to prevent them accumulating and forcing a --more--
+ crawl.mesclr()
-- Send the player to a random spot on the level.
you.random_teleport()
-- Forcibly redo LOS.
you.losight()
- -- And draw the view to keep the watcher entertained.
- crawl.redraw_view()
-
checks = checks + 1
-
local you_x, you_y = you.pos()
local visible_spots = { }
@@ -36,6 +34,7 @@ local function test_los()
you.moveto(x, y)
you.losight()
if not you.see_grid(you_x, you_y) then
+ -- Draw the view to show the problem.
crawl.redraw_view()
local this_p = dgn.point(x, y)
local you_p = dgn.point(you_x, you_y)
@@ -64,5 +63,5 @@ local function run_los_tests(depth, nlevels, tests_per_level)
end
for depth = 1, 27 do
- run_los_tests(depth, 10, 100)
+ run_los_tests(depth, 1, 10)
end \ No newline at end of file