summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/food.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-28 23:00:12 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-28 23:00:12 +0000
commitca1e897a646bb9c098a1fc651a3b4aa6c976ddc7 (patch)
treedbf6313bff2e2906a4f9ee61fdefff8594849522 /crawl-ref/source/food.cc
parent0f8c8527e5a685509462e0990a7b6ec6595e445a (diff)
downloadcrawl-ref-ca1e897a646bb9c098a1fc651a3b4aa6c976ddc7.tar.gz
crawl-ref-ca1e897a646bb9c098a1fc651a3b4aa6c976ddc7.zip
Apply r6640, r6694 (both by Darshan), r6670 (Haran), r6679 and r6703
(me) to branch. Includes TSO no longer granting permanent allies and resultant friendly pickup change, and a number of smaller changes. Also update change log. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6709 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/food.cc')
-rw-r--r--crawl-ref/source/food.cc25
1 files changed, 15 insertions, 10 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index d982ee7658..84c8ad5dc6 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -47,6 +47,7 @@
#include "mutation.h"
#include "output.h"
#include "player.h"
+#include "randart.h"
#include "religion.h"
#include "skills2.h"
#include "spells2.h"
@@ -208,17 +209,21 @@ static int _find_butchering_implement(int &butcher_tool)
// Look for a butchering implement in your pack.
for (int i = 0; i < ENDOFPACK; ++i)
{
- if (is_valid_item( you.inv[i] )
- && you.inv[i].base_type == OBJ_WEAPONS
- && can_cut_meat( you.inv[i] )
- && can_wield( &you.inv[i] ))
+ const item_def& tool(you.inv[i]);
+ if (is_valid_item( tool )
+ && tool.base_type == OBJ_WEAPONS
+ && can_cut_meat( tool )
+ && can_wield( &tool )
+ // Don't even suggest autocursing items.
+ && (!is_random_artefact(tool)
+ || !randart_known_wpn_property(tool, RAP_CURSED)))
{
if (Options.easy_butcher
- && item_known_uncursed(you.inv[i])
- && item_type_known(you.inv[i])
- && get_weapon_brand(you.inv[i]) != SPWPN_DISTORTION
+ && item_known_uncursed(tool)
+ && item_type_known(tool)
+ && get_weapon_brand(tool) != SPWPN_DISTORTION
// Don't even ask!
- && !has_warning_inscription(you.inv[i], OPER_WIELD))
+ && !has_warning_inscription(tool, OPER_WIELD))
{
butcher_tool = i;
return (true);
@@ -607,7 +612,7 @@ bool butchery(int which_corpse)
corpse_name.c_str());
repeat_prompt = false;
- keyin = tolower(c_getch());
+ keyin = tolower(getchm(KC_CONFIRM));
switch (keyin)
{
case 'b':
@@ -1204,7 +1209,7 @@ int eat_from_floor()
((si->quantity > 1) ? "one of " : ""),
item_name.c_str());
- int keyin = tolower(c_getch());
+ int keyin = tolower(getchm(KC_CONFIRM));
switch (keyin)
{
case 'q':