diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-01-01 05:02:09 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-01-03 04:45:59 +0100 |
commit | 405e9b68034c5e8793f6c169cbed7dd90d4ac8ba (patch) | |
tree | 792e3efe617bb42cfd8dadfb2c20947cad734e74 /crawl-ref/source/l_dgnit.cc | |
parent | 29969a4f936d3357f5f25971cbff31c026872a29 (diff) | |
download | crawl-ref-405e9b68034c5e8793f6c169cbed7dd90d4ac8ba.tar.gz crawl-ref-405e9b68034c5e8793f6c169cbed7dd90d4ac8ba.zip |
Use branch depth rather than absolute depth as the authoritative one.
Diffstat (limited to 'crawl-ref/source/l_dgnit.cc')
-rw-r--r-- | crawl-ref/source/l_dgnit.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crawl-ref/source/l_dgnit.cc b/crawl-ref/source/l_dgnit.cc index 6dbdbf2a08..e945750dc5 100644 --- a/crawl-ref/source/l_dgnit.cc +++ b/crawl-ref/source/l_dgnit.cc @@ -15,6 +15,7 @@ #include "libutil.h" #include "mapdef.h" #include "stash.h" +#include "place.h" #define ITEMLIST_METATABLE "crawldgn.item_list" @@ -83,7 +84,7 @@ static int dgn_create_item(lua_State *ls) item_list ilist = _lua_get_ilist(ls, 3); const int level = - lua_isnumber(ls, 4) ? lua_tointeger(ls, 4) : you.absdepth0; + lua_isnumber(ls, 4) ? lua_tointeger(ls, 4) : absdungeon_depth(); dgn_place_multiple_items(ilist, c, level); link_items(); @@ -93,9 +94,7 @@ static int dgn_create_item(lua_State *ls) static int dgn_item_property_remove(lua_State *ls) { if (item_def *item = clua_get_item(ls, 1)) - { item->props.erase(luaL_checkstring(ls, 2)); - } return (0); } |