diff options
author | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2011-02-17 20:28:22 +0100 |
---|---|---|
committer | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2011-02-17 20:31:02 +0100 |
commit | 1b65636845c45b6149175d3b97b7397efe83ffd6 (patch) | |
tree | 2c9c853a1fe60fff784372b712b9aafa220db352 /crawl-ref/source/food.h | |
parent | 36cea3e42b02b5ce8615a714e2ef784c5adbae0c (diff) | |
download | crawl-ref-1b65636845c45b6149175d3b97b7397efe83ffd6.tar.gz crawl-ref-1b65636845c45b6149175d3b97b7397efe83ffd6.zip |
Fix misinformation when clicking on rotten chunks as a non-saprovore.
The returned message was "You're not hungry enough" which is completely
misleading. Fixed by adding a can_ingest variant that gets the item
itself rather than base and subtype, so we can check for rottenness.
Diffstat (limited to 'crawl-ref/source/food.h')
-rw-r--r-- | crawl-ref/source/food.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/food.h b/crawl-ref/source/food.h index 8cdef5ed14..d101f45a22 100644 --- a/crawl-ref/source/food.h +++ b/crawl-ref/source/food.h @@ -60,8 +60,11 @@ bool is_preferred_food(const item_def &food); bool is_forbidden_food(const item_def &food); bool check_amu_the_gourmand(bool reqid); -bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, +bool can_ingest(const item_def &food, bool suppress_msg, bool reqid = false, bool check_hunger = true); +bool can_ingest(int what_isit, int kindof_thing, bool suppress_msg, + bool reqid = false, bool check_hunger = true, + bool rotten = false); bool chunk_is_poisonous(int chunktype); void eat_floor_item(int item_link); |