diff options
author | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2009-10-18 19:28:35 +0530 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2009-10-18 19:29:46 +0530 |
commit | 4286f58f0b8785719777b12056a1fca8df45ab1e (patch) | |
tree | 8ef8f12e029c358dca839e70462bd5cd50114d70 | |
parent | 16fdd3ec806d87ba783db05ed0ba1290bcbb3959 (diff) | |
download | crawl-ref-4286f58f0b8785719777b12056a1fca8df45ab1e.tar.gz crawl-ref-4286f58f0b8785719777b12056a1fca8df45ab1e.zip |
Add a call to reset the dungeon level before placing maps in los_maps test.
Dungeon cruft left behind from other tests was causing los_maps to fail occasionally; we now wipe the level clean before placing maps to test.
-rw-r--r-- | crawl-ref/source/luadgn.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/test/los_maps.lua | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/luadgn.cc b/crawl-ref/source/luadgn.cc index 2300ebefab..098c4ee603 100644 --- a/crawl-ref/source/luadgn.cc +++ b/crawl-ref/source/luadgn.cc @@ -3000,6 +3000,8 @@ LUAFN(dgn_cell_see_cell) PLUARET(number, cell_see_cell(p, q)); } +LUAWRAP(_dgn_reset_level, dgn_reset_level()) + static const struct luaL_reg dgn_lib[] = { { "dbg_goto_place", dgn_dbg_goto_place }, @@ -3008,6 +3010,7 @@ static const struct luaL_reg dgn_lib[] = { "dbg_dump_map", dgn_dbg_dump_map }, { "dbg_test_explore", dgn_dbg_test_explore }, + { "reset_level", _dgn_reset_level }, { "dismiss_monsters", dgn_dismiss_monsters }, { "default_depth", dgn_default_depth }, diff --git a/crawl-ref/source/test/los_maps.lua b/crawl-ref/source/test/los_maps.lua index 09e173ea62..8048b7243e 100644 --- a/crawl-ref/source/test/los_maps.lua +++ b/crawl-ref/source/test/los_maps.lua @@ -11,6 +11,7 @@ local water = dgn.find_feature_number("deep_water") local function test_los_map(map) crawl.mesclr() + dgn.reset_level() -- choose random debug map; better choose all dgn.tags(map, "no_rotate no_vmirror no_hmirror no_pool_fixup") local name = dgn.name(map) @@ -61,4 +62,3 @@ local function test_los_maps() end test_los_maps() - |