summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_item.cc
diff options
context:
space:
mode:
authorPekka Lampila <pekka.lampila@iki.fi>2013-04-13 20:37:44 +0300
committerSamuel Bronson <naesten@gmail.com>2013-04-17 15:25:08 -0400
commitb6b0b3154d4c274aba3e52efbc40882b985e7da7 (patch)
tree18a257d722083dbf5e73b40cb220bca95bfd4685 /crawl-ref/source/l_item.cc
parent231196a0620ac86d6ad1165f256f5577c905478a (diff)
downloadcrawl-ref-b6b0b3154d4c274aba3e52efbc40882b985e7da7.tar.gz
crawl-ref-b6b0b3154d4c274aba3e52efbc40882b985e7da7.zip
Annotate god gifts for stash search
Diffstat (limited to 'crawl-ref/source/l_item.cc')
-rw-r--r--crawl-ref/source/l_item.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/l_item.cc b/crawl-ref/source/l_item.cc
index 58c1b61d72..05176fc2c3 100644
--- a/crawl-ref/source/l_item.cc
+++ b/crawl-ref/source/l_item.cc
@@ -623,6 +623,16 @@ IDEF(snakable)
return 1;
}
+IDEF(god_gift)
+{
+ if (!item || !item->defined())
+ return 0;
+
+ lua_pushboolean(ls, origin_is_god_gift(*item));
+
+ return 1;
+}
+
// DLUA-only functions
static int l_item_do_pluses(lua_State *ls)
{
@@ -1040,6 +1050,7 @@ static ItemAccessor item_attrs[] =
{ "artefact", l_item_artefact },
{ "branded", l_item_branded },
{ "snakable", l_item_snakable },
+ { "god_gift", l_item_god_gift },
{ "class", l_item_class },
{ "subtype", l_item_subtype },
{ "cursed", l_item_cursed },