summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/food.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-02-06 17:16:29 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-02-06 17:16:29 +0000
commit7f57e44d0660cbb1c9971f3c170a011ffa7eb4a1 (patch)
tree4aabbc1342ffefd16aa804e183c4867624af764b /crawl-ref/source/food.cc
parent24be3228d463d6b2501cbca9368e14e91ab42182 (diff)
downloadcrawl-ref-7f57e44d0660cbb1c9971f3c170a011ffa7eb4a1.tar.gz
crawl-ref-7f57e44d0660cbb1c9971f3c170a011ffa7eb4a1.zip
Better messages when canceling butcher.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@925 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/food.cc')
-rw-r--r--crawl-ref/source/food.cc22
1 files changed, 16 insertions, 6 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 0ac4a3801c..a447d19cd6 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -237,21 +237,26 @@ bool butchery(void)
return (false);
}
- int objl;
-
- for (objl = igrd[you.x_pos][you.y_pos]; objl != NON_ITEM;
+ bool canceled_butcher = false;
+ bool found_nonzero_corpses = false;
+ for (int objl = igrd[you.x_pos][you.y_pos]; objl != NON_ITEM;
objl = mitm[objl].link)
{
if ( (mitm[objl].base_type != OBJ_CORPSES) ||
(mitm[objl].sub_type != CORPSE_BODY) )
continue;
+ found_nonzero_corpses = true;
+
// offer the possibility of butchering
it_name(objl, DESC_NOCAP_A, str_pass);
snprintf(info, INFO_SIZE, "Butcher %s?", str_pass);
int answer = yesnoquit( info, true, 'n', false );
if ( answer == -1 )
+ {
+ canceled_butcher = true;
break;
+ }
if ( answer == 0 )
continue;
@@ -327,10 +332,15 @@ bool butchery(void)
return true;
}
-
- mpr("There isn't anything to dissect here.");
- if (!new_cursed && wpn_switch) { // should never happen
+ if (canceled_butcher)
+ canned_msg(MSG_OK);
+ else
+ mprf("There isn't anything %sto dissect here.",
+ found_nonzero_corpses? "else " : "");
+
+ if (!new_cursed && wpn_switch) // should never happen
+ {
weapon_switch( old_weapon );
}