diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-12-30 01:35:10 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-12-30 01:35:10 -0800 |
commit | 9483afb14439b650bda657d4f14c6a8dfdfc9e66 (patch) | |
tree | e2b858f553d070c4103fdb63e802e92334a32e39 /crawl-ref/source/show.cc | |
parent | 41fe930161f170b0b71eddb284a6568f08ecb6e2 (diff) | |
download | crawl-ref-9483afb14439b650bda657d4f14c6a8dfdfc9e66.tar.gz crawl-ref-9483afb14439b650bda657d4f14c6a8dfdfc9e66.zip |
Hide items under deep water and lava
Diffstat (limited to 'crawl-ref/source/show.cc')
-rw-r--r-- | crawl-ref/source/show.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc index c37901d7e0..103d00b09d 100644 --- a/crawl-ref/source/show.cc +++ b/crawl-ref/source/show.cc @@ -234,15 +234,22 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep) glyph g = get_item_glyph(eitem); const dungeon_feature_type feat = grd(gp); + + if ((feat == DNGN_DEEP_WATER && you.species != SP_MERFOLK) + || feat == DNGN_LAVA) + return; + if (Options.feature_item_brand && is_critical_feature(feat)) ecol |= COLFLAG_FEATURE_ITEM; else if (Options.trap_item_brand && feat_is_trap(feat)) ecol |= COLFLAG_TRAP_ITEM; else { - const unsigned short gcol = env.grid_colours(gp); - ecol = (feat == DNGN_SHALLOW_WATER) ? - (gcol != BLACK ? gcol : CYAN) : g.col; + ecol = g.col; + + if (feat_is_water(feat)) + ecol = _feat_colour(gp, feat); + // monster(mimic)-owned items have link = NON_ITEM+1+midx if (eitem->link > NON_ITEM && igrd(gp) != NON_ITEM) ecol |= COLFLAG_ITEM_HEAP; |