diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2010-06-08 19:43:25 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2010-06-08 19:52:12 +0200 |
commit | 430af9ab3b4227e3ece159cb41c5eab1a62d30a1 (patch) | |
tree | 55e6d4b9f77b4aa66d9636596588df65ebcb48d5 /crawl-ref/source/l_debug.cc | |
parent | 54d3624cb6ff8bcdbe981f9fb4badc7839284a16 (diff) | |
download | crawl-ref-430af9ab3b4227e3ece159cb41c5eab1a62d30a1.tar.gz crawl-ref-430af9ab3b4227e3ece159cb41c5eab1a62d30a1.zip |
Some debug Lua bindings to make player take stairs.
Diffstat (limited to 'crawl-ref/source/l_debug.cc')
-rw-r--r-- | crawl-ref/source/l_debug.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crawl-ref/source/l_debug.cc b/crawl-ref/source/l_debug.cc index 0574bfa3c2..9fcb51911b 100644 --- a/crawl-ref/source/l_debug.cc +++ b/crawl-ref/source/l_debug.cc @@ -14,6 +14,7 @@ #include "coordit.h" #include "dungeon.h" #include "env.h" +#include "files.h" #include "initfile.h" #include "godwrath.h" #include "libutil.h" @@ -24,6 +25,7 @@ #include "mon-stuff.h" #include "mon-util.h" #include "place.h" +#include "stairs.h" #ifdef USE_TILE #include "tileview.h" #endif @@ -59,6 +61,21 @@ LUAFN(debug_goto_place) return (0); } +LUAFN(debug_enter_dungeon) +{ + init_level_connectivity(); + + you.absdepth0 = 0; + you.where_are_you = BRANCH_MAIN_DUNGEON; + you.level_type = LEVEL_DUNGEON; + + load(DNGN_STONE_STAIRS_DOWN_I, LOAD_START_GAME, level_id()); + return (0); +} + +LUAWRAP(debug_down_stairs, down_stairs(DNGN_STONE_STAIRS_DOWN_I)) +LUAWRAP(debug_up_stairs, up_stairs(DNGN_STONE_STAIRS_UP_I)) + LUAFN(debug_flush_map_memory) { dgn_flush_map_memory(); @@ -306,6 +323,9 @@ LUAFN(debug_viewwindow) const struct luaL_reg debug_dlib[] = { { "goto_place", debug_goto_place }, +{ "enter_dungeon", debug_enter_dungeon }, +{ "down_stairs", debug_down_stairs }, +{ "up_stairs", debug_up_stairs }, { "flush_map_memory", debug_flush_map_memory }, { "generate_level", debug_generate_level }, { "los_changed", debug_los_changed }, |