summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemprop.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-16 18:58:05 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-01-16 18:58:05 +0000
commitb9231c6613788ace1d7adfde1a0e028b21fae993 (patch)
tree974c93e302c3137100526d0a4a9e9586687c2efc /crawl-ref/source/itemprop.cc
parentb8ba267261e0586c01fad1c5f280d1fd16cd44ca (diff)
downloadcrawl-ref-b9231c6613788ace1d7adfde1a0e028b21fae993.tar.gz
crawl-ref-b9231c6613788ace1d7adfde1a0e028b21fae993.zip
'DD' is now an alias for 'Dy'.
Clean up some corpse handling, add food_is_rotten() function instead of manually checking special < 100 everywhere. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3283 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r--crawl-ref/source/itemprop.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 2d35a8e5f5..2dc8e9bcce 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -1975,6 +1975,14 @@ bool can_cut_meat( const item_def &item )
return (does_damage_type( item, DAM_SLICE ));
}
+bool food_is_rotten( const item_def &item )
+{
+ return (item.special < 100) && ((item.base_type == OBJ_CORPSES &&
+ item.sub_type == CORPSE_BODY) ||
+ (item.base_type == OBJ_FOOD &&
+ item.sub_type == FOOD_CHUNK));
+}
+
// returns true if item counts as a tool for tool size comparisons and msgs
bool is_tool( const item_def &item )
{