diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-10 07:41:27 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-10 07:41:27 +0000 |
commit | aa3717c904d5d25c9f58f5d17e66379966f00a8f (patch) | |
tree | b0e55eb934017aada2332593ee8aa8979aeb9b58 /crawl-ref/settings | |
parent | 172979dfbcd139f1adba90624340e9e6e5184cae (diff) | |
download | crawl-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/settings')
-rw-r--r-- | crawl-ref/settings/init.txt | 7 | ||||
-rw-r--r-- | crawl-ref/settings/pickup_butcher_tool.txt | 33 |
2 files changed, 4 insertions, 36 deletions
diff --git a/crawl-ref/settings/init.txt b/crawl-ref/settings/init.txt index d489f53e32..7499e48ec6 100644 --- a/crawl-ref/settings/init.txt +++ b/crawl-ref/settings/init.txt @@ -80,6 +80,7 @@ lua_file = lua/runrest.lua lua_file = lua/gearset.lua lua_file = lua/eat.lua lua_file = lua/trapwalk.lua +lua_file = lua/pickup.lua # kills.lua yields more information at the cost of huge dumps. # lua_file = lua/kills.lua @@ -90,9 +91,9 @@ lua_file = lua/trapwalk.lua # autopickup = $?!+"/%) -# lua routines for automatically picking up one butchering tool -# This require ) in autopickup and no further weapons are picked up. -include = pickup_butcher_tool.txt +# Note that ")" have to be in the above list for pickup.lua +# (autopickup a butchering tool if you don't already have one) +# to work. # There is a long list of autopickup exceptions in include = autopickup_exceptions.txt diff --git a/crawl-ref/settings/pickup_butcher_tool.txt b/crawl-ref/settings/pickup_butcher_tool.txt deleted file mode 100644 index d6408811d1..0000000000 --- a/crawl-ref/settings/pickup_butcher_tool.txt +++ /dev/null @@ -1,33 +0,0 @@ -# Pick up a butchering weapon if we don't already have one -< do -local function can_butcher(it, name) - if not item.can_cut_meat(it) then - return false - end - if item.cursed(it) then - return false - end - if name:find("distort", 0, true) then - return false - end - return true -end -function pickup_butcher(it, name) - if you.has_claws() > 0 then - return false - end - if not you.can_consume_corpses() and not you.god_likes_butchery() then - return false - end - if not can_butcher(it, name) then - return false - end - for _, inv_it in pairs(item.inventory()) do - if can_butcher(inv_it, item.name(inv_it)) then - return false - end - end - return true -end -add_autopickup_func(pickup_butcher) -end > |