Signed-off-by: Darshan Shaligram <dshaligram@users.sourceforge.net>
AZVELA2S52B5TN7NTARAYOG4DDTFOOROQ3IG5W3GIHE3PMEUEGEQC -- Check specific map generation, useful for testing portal vault-- generation (SUBSTs, NSBUSTs, SHUFFLEs, etc).-- Name of the map!local map_to_test = ""-- Which des file is the map in?local des_file = ""-- Change to true if the des file isn't specificed in dat/clua/loadmaps.lualocal need_to_load_des = false-- How many times should we generate?local checks = 10-- Output to this file, will append iteration to the end, ie,-- output_to.map.1, output_to.map.2, etc.local output_to = ""-- Should we run these tests?local run_test = falselocal function generate_map()if map_to_test == "" or(des_file == "" and need_to_load_des) oroutput_to == "" thenassert(false, "Need a map, a des file (if not already loaded), and an output.")endif need_to_load_des thendgn.load_des_file(des_file)endlocal map = dgn.map_by_name(map_to_test)if not map thenassert(false, "Couldn't find the map named " .. map_to_test)endfor iter_i = 1, checks dodebug.flush_map_memory()crawl.mesclr()dgn.reset_level()dgn.tags(map, "no_rotate no_vmirror no_hmirror no_pool_fixup")dgn.place_map(map, true, true)crawl.mpr("Placed " .. map_to_test .. ":" .. iter_i .. ", dumping to " .. output_to .. "." .. iter_i)debug.dump_map(map_to_test .. "." .. iter_i)endendif run_test thengenerate_map()elsecrawl.mpr("Not running vault generation test.")end