diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-29 11:58:54 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-29 11:58:54 +0000 |
commit | f0229aa5f1ecc1f23dcaa987075b9207784e9b91 (patch) | |
tree | 5916c258f2c103336cc470627873fc42b9749ec4 /crawl-ref/source/luadgn.cc | |
parent | 7d9814f3cbe24c356c75cf0363464303961ece59 (diff) | |
download | crawl-ref-f0229aa5f1ecc1f23dcaa987075b9207784e9b91.tar.gz crawl-ref-f0229aa5f1ecc1f23dcaa987075b9207784e9b91.zip |
Moved the list of required .des files into loadmaps.lua.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1687 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/luadgn.cc')
-rw-r--r-- | crawl-ref/source/luadgn.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/luadgn.cc b/crawl-ref/source/luadgn.cc index 65bc150799..3060248deb 100644 --- a/crawl-ref/source/luadgn.cc +++ b/crawl-ref/source/luadgn.cc @@ -10,6 +10,7 @@ #include "files.h" #include "luadgn.h" #include "mapdef.h" +#include "maps.h" #include "stuff.h" #include "dungeon.h" #include <sstream> @@ -730,6 +731,14 @@ static int dgn_original_map(lua_State *ls) return (1); } +static int dgn_load_des_file(lua_State *ls) +{ + const std::string &file = luaL_checkstring(ls, 1); + if (!file.empty()) + read_map(file); + return (0); +} + static const struct luaL_reg dgn_lib[] = { { "default_depth", dgn_default_depth }, @@ -758,6 +767,7 @@ static const struct luaL_reg dgn_lib[] = { "gly_point", dgn_gly_point }, { "gly_points", dgn_gly_points }, { "original_map", dgn_original_map }, + { "load_des_file", dgn_load_des_file }, { NULL, NULL } }; |