diff options
Diffstat (limited to 'crawl-ref/source/dat')
-rw-r--r-- | crawl-ref/source/dat/clua/sanity.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crawl-ref/source/dat/clua/sanity.lua b/crawl-ref/source/dat/clua/sanity.lua new file mode 100644 index 0000000000..aea29a5b96 --- /dev/null +++ b/crawl-ref/source/dat/clua/sanity.lua @@ -0,0 +1,17 @@ +-- Sanity checks that should be run just before the game starts. + +local function assert_place_has_map(place) + assert(dgn.map_by_place(place), "No map found for " .. place) +end + +local function sanity_checks() + local places = { + "Zot:$", "Snake:$", "Swamp:$", "Slime:$", "Vault:$", + "Tomb:$", "Coc:$", "Tar:$", "Dis:$", "Geh:$" + } + for _, place in ipairs(places) do + assert_place_has_map(place) + end +end + +sanity_checks()
\ No newline at end of file |