From 588ba77a56ffc7262ee41f4f744129371c5bdc75 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Tue, 27 Oct 2009 14:39:25 +0100 Subject: Move Lua monster bindings into the dungeon lua. They appear to be used only for ziggurat monster placement, and I'm finding it hard to see a safe use of these for the user. Correct me if I'm wrong. --- crawl-ref/source/clua.cc | 1 - crawl-ref/source/dlua.cc | 1 + crawl-ref/source/l_libs.h | 2 +- crawl-ref/source/l_mons.cc | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc index 4c2367e0b5..9cfdfabdab 100644 --- a/crawl-ref/source/clua.cc +++ b/crawl-ref/source/clua.cc @@ -580,7 +580,6 @@ void CLua::init_lua() cluaopen_crawl(_state); cluaopen_file(_state); cluaopen_options(_state); - cluaopen_monsters(_state); cluaopen_globals(_state); diff --git a/crawl-ref/source/dlua.cc b/crawl-ref/source/dlua.cc index d80c64118c..24fd13356f 100644 --- a/crawl-ref/source/dlua.cc +++ b/crawl-ref/source/dlua.cc @@ -271,6 +271,7 @@ void init_dungeon_lua() dluaopen_crawl(dlua); dluaopen_file(dlua); dluaopen_mapgrd(dlua); + dluaopen_monsters(dlua); dluaopen_you(dlua); luaL_openlib(dlua, "dgn", dgn_dlib, 0); diff --git a/crawl-ref/source/l_libs.h b/crawl-ref/source/l_libs.h index 9913a5748e..736545caab 100644 --- a/crawl-ref/source/l_libs.h +++ b/crawl-ref/source/l_libs.h @@ -17,7 +17,6 @@ void cluaopen_file(lua_State *ls); void cluaopen_food(lua_State *ls); void cluaopen_item(lua_State *ls); void cluaopen_kills(lua_State *ls); // defined in kills.cc -void cluaopen_monsters(lua_State *ls); void cluaopen_options(lua_State *ls); void cluaopen_you(lua_State *ls); @@ -61,6 +60,7 @@ void register_builder_funcs(lua_State *ls); void dluaopen_crawl(lua_State *ls); void dluaopen_file(lua_State *ls); void dluaopen_mapgrd(lua_State *ls); +void dluaopen_monsters(lua_State *ls); void dluaopen_you(lua_State *ls); diff --git a/crawl-ref/source/l_mons.cc b/crawl-ref/source/l_mons.cc index 3a4aa2af94..65d72c4ab4 100644 --- a/crawl-ref/source/l_mons.cc +++ b/crawl-ref/source/l_mons.cc @@ -227,7 +227,7 @@ static const struct luaL_reg mons_lib[] = { NULL, NULL } }; -void cluaopen_monsters(lua_State *ls) +void dluaopen_monsters(lua_State *ls) { luaL_newmetatable(ls, MONS_METATABLE); lua_pushstring(ls, "__index"); -- cgit v1.2.3-54-g00ecf