summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
diff options
context:
space:
mode:
authorJohanna Ploog <j-p-e-g@users.sourceforge.net>2010-01-09 14:12:15 +0100
committerJohanna Ploog <j-p-e-g@users.sourceforge.net>2010-01-09 14:12:15 +0100
commit8f662453f566222479ffcf856d70581c7c131c03 (patch)
tree18f68db1ca78d616e05f3ba677f385ff62a2c76c /crawl-ref/source/invent.cc
parent40a5cf776b1309872551df44650a1dc13317fdcf (diff)
downloadcrawl-ref-8f662453f566222479ffcf856d70581c7c131c03.tar.gz
crawl-ref-8f662453f566222479ffcf856d70581c7c131c03.zip
Tiles: Add icons for poisonous/mutagenic/... chunks or corpses.
I'm not sure how to visualize contaminated chunks, so they haven't got an icon yet (maybe use coagulated blood?) Also, I've opted to only show the icons for rotten chunks if the character is capable of eating them. Otherwise, them being rotten is all that's of interest to the player.
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r--crawl-ref/source/invent.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 887fbd436c..26b882755c 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -553,9 +553,18 @@ bool InvEntry::get_tiles(std::vector<tile_def>& tileset) const
}
}
}
- int brand = tile_known_weapon_brand(*item);
- if (brand)
- tileset.push_back(tile_def(brand, TEX_DEFAULT));
+ if (item->base_type == OBJ_WEAPONS || item->base_type == OBJ_MISSILES)
+ {
+ int brand = tile_known_weapon_brand(*item);
+ if (brand)
+ tileset.push_back(tile_def(brand, TEX_DEFAULT));
+ }
+ else if (item->base_type == OBJ_CORPSES)
+ {
+ int brand = tile_corpse_brand(*item);
+ if (brand)
+ tileset.push_back(tile_def(brand, TEX_DEFAULT));
+ }
return (true);
}