summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-21 12:02:30 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-21 12:02:30 +0000
commit20e1e61ec9150b594e8478cac1d7932ecc14300b (patch)
treed47a91a3cd42b348165812f831a70c60bafd1852 /crawl-ref/source/invent.cc
parent454943c33887d4c92fe23dbd365ec782c015b8d6 (diff)
downloadcrawl-ref-20e1e61ec9150b594e8478cac1d7932ecc14300b.tar.gz
crawl-ref-20e1e61ec9150b594e8478cac1d7932ecc14300b.zip
2026956: only prompt for sharp weapons in butchery.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6963 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r--crawl-ref/source/invent.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 453cb4f167..1e4cdf7141 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -361,6 +361,8 @@ static std::string _no_selectables_message(int item_selector)
return("You aren't carrying any wands.");
case OSEL_THROWABLE:
return("You aren't carrying any items that might be thrown or fired.");
+ case OSEL_BUTCHERY:
+ return("You aren't carrying any sharp implements.");
}
return("You aren't carrying any such object.");
@@ -820,6 +822,9 @@ static bool _item_class_selected(const item_def &i, int selector)
return (itype == OBJ_WEAPONS || itype == OBJ_STAVES
|| itype == OBJ_MISCELLANY);
+ case OSEL_BUTCHERY:
+ return (itype == OBJ_WEAPONS && can_cut_meat(i));
+
case OSEL_MEMORISE:
return (itype == OBJ_BOOKS && i.sub_type != BOOK_MANUAL
&& (i.sub_type != BOOK_DESTRUCTION || !item_type_known(i)));
@@ -1326,7 +1331,7 @@ int prompt_invent_item( const char *prompt,
}
if (!_any_items_to_select(type_expect) && type_expect != OSEL_WIELD
- && mtype == MT_INVLIST)
+ && type_expect != OSEL_BUTCHERY && mtype == MT_INVLIST)
{
mprf(MSGCH_PROMPT, "%s",
_no_selectables_message(type_expect).c_str());