diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-21 13:41:10 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-21 13:41:10 +0000 |
commit | cbb457d13f09655c81aa5a0e942fbb34f4a76712 (patch) | |
tree | 33ae292819a64b31a12a0b2209aa0bbbf6ad036e /crawl-ref/source/item_use.cc | |
parent | b30aacda1fd2b82ae1436f3ac24e3c588d8209d1 (diff) | |
download | crawl-ref-cbb457d13f09655c81aa5a0e942fbb34f4a76712.tar.gz crawl-ref-cbb457d13f09655c81aa5a0e942fbb34f4a76712.zip |
Tiles: allow direct selection of corpse to be butchered from floor
or to drink blood from for vampires
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3313 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 594201e9c7..30e53c6cc1 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -4448,6 +4448,27 @@ void tile_use_item(int idx, InvAction act) drop_item(idx, you.inv[idx].quantity); return; } + else if (act == INV_USE_FLOOR) + { + if (mitm[idx].base_type == OBJ_CORPSES + && you.inv[idx].sub_type != CORPSE_SKELETON + && !food_is_rotten(you.inv[idx])) + { + butchery(idx); + } + return; + } + else if (act == INV_EAT_FLOOR) + { + if (mitm[idx].base_type == OBJ_CORPSES + && you.species == SP_VAMPIRE + || mitm[idx].base_type == OBJ_FOOD + && you.species != SP_MUMMY && you.species != SP_VAMPIRE) + { + eat_floor_item(idx); + } + return; + } else if (act != INV_USE) { return; |