From 74c535b701b7642b74b45934e78cadd7ab67a0e4 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 03:27:21 -0800 Subject: Ignore obscured items in the UI I probably missed a few spots. --- crawl-ref/source/show.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/show.cc') diff --git a/crawl-ref/source/show.cc b/crawl-ref/source/show.cc index 103d00b09d..0148d92438 100644 --- a/crawl-ref/source/show.cc +++ b/crawl-ref/source/show.cc @@ -224,8 +224,8 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep) const monsters* m = monster_at(gp); if (m && mons_is_unknown_mimic(m)) eitem = &get_mimic_item(m); - else if (igrd(gp) != NON_ITEM) - eitem = &mitm[igrd(gp)]; + else if (you.visible_igrd(gp) != NON_ITEM) + eitem = &mitm[you.visible_igrd(gp)]; else return; @@ -235,10 +235,6 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep) 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)) @@ -251,7 +247,7 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep) ecol = _feat_colour(gp, feat); // monster(mimic)-owned items have link = NON_ITEM+1+midx - if (eitem->link > NON_ITEM && igrd(gp) != NON_ITEM) + if (eitem->link > NON_ITEM && you.visible_igrd(gp) != NON_ITEM) ecol |= COLFLAG_ITEM_HEAP; else if (eitem->link < NON_ITEM && !crawl_state.arena) ecol |= COLFLAG_ITEM_HEAP; @@ -260,7 +256,7 @@ void show_def::_update_item_at(const coord_def &gp, const coord_def &ep) } #ifdef USE_TILE - int idx = igrd(gp); + int idx = you.visible_igrd(gp); if (idx != NON_ITEM) { if (feat_is_stair(feat)) -- cgit v1.2.3-54-g00ecf