summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/food.cc
diff options
context:
space:
mode:
authorPekka Lampila <pekka.lampila@iki.fi>2014-01-25 00:44:26 +0200
committerPekka Lampila <pekka.lampila@iki.fi>2014-01-25 00:51:21 +0200
commit23562a0c5d124e0e90ec04926f1fe565ac149fde (patch)
tree710f56334b1eedd9db2a582810d5e940047ad12b /crawl-ref/source/food.cc
parent63e917aaf12720bf21041259b986467b89557656 (diff)
downloadcrawl-ref-23562a0c5d124e0e90ec04926f1fe565ac149fde.tar.gz
crawl-ref-23562a0c5d124e0e90ec04926f1fe565ac149fde.zip
Allow mutagenic chunks to be eaten when satiated
They don't give nutrition and player can usually get hungry by spamming spells/rods/abilities anyway.
Diffstat (limited to 'crawl-ref/source/food.cc')
-rw-r--r--crawl-ref/source/food.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index ae1f253d28..1df7be82cc 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -2226,8 +2226,11 @@ bool can_ingest(const item_def &food, bool suppress_msg, bool check_hunger)
return false;
}
}
+ // special case mutagenic chunks to skip hunger checks, as they don't give
+ // nutrition and player can get hungry by using spells etc. anyway
return can_ingest(food.base_type, food.sub_type, suppress_msg,
- check_hunger, food_is_rotten(food));
+ is_mutagenic(food) ? false : check_hunger,
+ food_is_rotten(food));
}
bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg,