diff options
author | Kek <tuk kek at gmail com> | 2011-11-16 14:07:47 -0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-11-20 22:42:08 +0100 |
commit | 49b81c712f8a6e73d11a8bbca9934b0b07f11760 (patch) | |
tree | 31f9050d2218e99ee4b54a88afb8788a18617ed1 /crawl-ref/source/l_item.cc | |
parent | 3f10d5ab58641f21fe5e56c0ecc3effeb2ef566d (diff) | |
download | crawl-ref-49b81c712f8a6e73d11a8bbca9934b0b07f11760.tar.gz crawl-ref-49b81c712f8a6e73d11a8bbca9934b0b07f11760.zip |
expand lua script engine [item.is_useless, you.contaminated, you.feel_safe]
Diffstat (limited to 'crawl-ref/source/l_item.cc')
-rw-r--r-- | crawl-ref/source/l_item.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/l_item.cc b/crawl-ref/source/l_item.cc index 640e292030..61b8dd2677 100644 --- a/crawl-ref/source/l_item.cc +++ b/crawl-ref/source/l_item.cc @@ -550,6 +550,16 @@ IDEF(is_bad_food) return (1); } +IDEF(is_useless) +{ + if (!item || !item->defined()) + return (0); + + lua_pushboolean(ls, is_useless_item(*item)); + + return (1); +} + IDEF(artefact) { if (!item || !item->defined()) @@ -999,6 +1009,7 @@ static ItemAccessor item_attrs[] = { "dropped", l_item_dropped }, { "can_cut_meat", l_item_can_cut_meat }, { "is_bad_food", l_item_is_bad_food }, + { "is_useless", l_item_is_useless }, { "pluses", l_item_pluses }, { "destroy", l_item_destroy }, { "dec_quantity", l_item_dec_quantity }, |