summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/food.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-13 17:05:38 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-13 17:05:38 +0000
commit2f4c72e5d1f2a84ddc6ac24b3b4628edc4e43dc3 (patch)
treec550248ea8f9972e0deacc6d60a6d1cb30238d27 /crawl-ref/source/food.cc
parent40b67090ce5ff65d918b7297858cf2d6f182afd5 (diff)
downloadcrawl-ref-2f4c72e5d1f2a84ddc6ac24b3b4628edc4e43dc3.tar.gz
crawl-ref-2f4c72e5d1f2a84ddc6ac24b3b4628edc4e43dc3.zip
Clean things up a bit more.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3625 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/food.cc')
-rw-r--r--crawl-ref/source/food.cc22
1 files changed, 13 insertions, 9 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 318f59a38a..92d8f42d84 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -531,18 +531,22 @@ bool prompt_eat_from_inventory(int slot)
// this conditional can later be merged into food::can_ingest() when
// expanded to handle more than just OBJ_FOOD 16mar200 {dlb}
- if (you.species != SP_VAMPIRE &&
- you.inv[which_inventory_slot].base_type != OBJ_FOOD)
+ if (you.species != SP_VAMPIRE)
{
- mpr("You can't eat that!");
- return (false);
+ if (you.inv[which_inventory_slot].base_type != OBJ_FOOD)
+ {
+ mpr("You can't eat that!");
+ return (false);
+ }
}
- else if (you.species == SP_VAMPIRE &&
- (you.inv[which_inventory_slot].base_type != OBJ_CORPSES
- || you.inv[which_inventory_slot].sub_type != CORPSE_BODY))
+ else
{
- mpr("You crave blood!");
- return (false);
+ if (you.inv[which_inventory_slot].base_type != OBJ_CORPSES
+ || you.inv[which_inventory_slot].sub_type != CORPSE_BODY)
+ {
+ mpr("You crave blood!");
+ return (false);
+ }
}
if (!can_ingest( you.inv[which_inventory_slot].base_type,