diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/food.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/invent.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/invent.h | 3 |
3 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 902d8db009..85339ceab0 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -236,7 +236,7 @@ static int _find_butchering_implement(int &butcher_tool) const int item_slot = prompt_invent_item( "What would you like to use? (- for none)?", - MT_INVLIST, OSEL_WIELD, + MT_INVLIST, OSEL_BUTCHERY, true, true, true, '-', -1, NULL, OPER_WIELD); if (prompt_failed(item_slot)) 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()); diff --git a/crawl-ref/source/invent.h b/crawl-ref/source/invent.h index 099258336d..8a28bcd942 100644 --- a/crawl-ref/source/invent.h +++ b/crawl-ref/source/invent.h @@ -27,7 +27,8 @@ enum object_selector OSEL_ENCH_ARM = -7, OSEL_VAMP_EAT = -8, OSEL_DRAW_DECK = -9, - OSEL_THROWABLE = -10 + OSEL_THROWABLE = -10, + OSEL_BUTCHERY = -11 }; #define PROMPT_ABORT -1 |