diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-28 12:04:38 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-28 12:04:38 +0000 |
commit | d1968a5ba426ba5d202ff2824115b568de3f5f3f (patch) | |
tree | 04495c853b89bb901659bf1959b97ae835e79816 /crawl-ref/source/maps.cc | |
parent | 26f8579e71cadfe6d757a1a8c979a51eba6305df (diff) | |
download | crawl-ref-d1968a5ba426ba5d202ff2824115b568de3f5f3f.tar.gz crawl-ref-d1968a5ba426ba5d202ff2824115b568de3f5f3f.zip |
Updated level-design.txt with a basic overview of the Lua possibilities.
Fixed some inconsistencies in the handling of Lua errors.
Tweaked the lexer to allow spaces before Lua chunk prefixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1676 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r-- | crawl-ref/source/maps.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc index 8b89d52115..dd64467129 100644 --- a/crawl-ref/source/maps.cc +++ b/crawl-ref/source/maps.cc @@ -112,10 +112,15 @@ static int write_vault(map_def &mdef, map_type map, static bool resolve_map(map_def &map, const map_def &original) { map.reinit(); - map.run_lua(true); + std::string err = map.run_lua(true); + if (!err.empty()) + { + mprf(MSGCH_WARN, "Lua error: %s", err.c_str()); + return (false); + } map.resolve(); - if (!map.test_lua_validate()) + if (!map.test_lua_validate(false)) return (false); // Mirroring is possible for any map that does not explicitly forbid it. |