summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/items.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-10 07:41:27 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-10 07:41:27 +0000
commitaa3717c904d5d25c9f58f5d17e66379966f00a8f (patch)
treeb0e55eb934017aada2332593ee8aa8979aeb9b58 /crawl-ref/source/items.cc
parent172979dfbcd139f1adba90624340e9e6e5184cae (diff)
downloadcrawl-ref-aa3717c904d5d25c9f58f5d17e66379966f00a8f.tar.gz
crawl-ref-aa3717c904d5d25c9f58f5d17e66379966f00a8f.zip
Move pickup_butcher_tool.txt into (the recently freed) pickup.lua,
re-enable it (whoops) and clean up its code. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5698 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r--crawl-ref/source/items.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index d4ff6e63fa..354257023a 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2247,6 +2247,9 @@ bool item_needs_autopickup(const item_def &item)
std::string itemname;
return ((Options.autopickups & (1L << item.base_type)
+#ifdef CLUA_BINDINGS
+ && clua.callbooleanfn(true, "ch_autopickup", "u", &item)
+#endif
&& !is_useless_item(item) && !is_inedible(item)
|| _is_forced_autopickup(item, itemname))
&& (Options.pickup_dropped || !(item.flags & ISFLAG_DROPPED))