summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-11-21 22:41:18 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-21 22:41:18 +1000
commitb9101bc3717daffdf0e898fa701cccd4b64765ce (patch)
tree3b3a8a357ab12f8f31b926838609464f4aaeb9fe /crawl-ref/source
parent15d9b8789849cf5f514d5ae32e59d85a92d8ff51 (diff)
downloadcrawl-ref-b9101bc3717daffdf0e898fa701cccd4b64765ce.tar.gz
crawl-ref-b9101bc3717daffdf0e898fa701cccd4b64765ce.zip
A nasty hack to allow access to the item library in vaults.
As the item library is aptly named "item", and the function for specifying item slots in a vault is likewise named "item", there's no way for vaults to access any of the functionality in the item library (it just returns errors about accessing a function value). I'm not sure what changing the name of the item library will do, however, so I've left it the same and simply added a second copy using the library name of "items". It seems to function correctly, and hopefully will not cause any issues. Perhaps the current "item" library could actually be renamed, but this may have impact on user-defined scripts.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/l_item.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/l_item.cc b/crawl-ref/source/l_item.cc
index 4cf0a7e030..57e8eb9ca8 100644
--- a/crawl-ref/source/l_item.cc
+++ b/crawl-ref/source/l_item.cc
@@ -722,4 +722,5 @@ static const struct luaL_reg item_lib[] =
void cluaopen_item(lua_State *ls)
{
luaL_openlib(ls, "item", item_lib, 0);
+ luaL_openlib(ls, "items", item_lib, 0);
}