From 20e1e61ec9150b594e8478cac1d7932ecc14300b Mon Sep 17 00:00:00 2001 From: haranp Date: Sun, 21 Sep 2008 12:02:30 +0000 Subject: 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 --- crawl-ref/source/invent.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/invent.cc') 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()); -- cgit v1.2.3-54-g00ecf