From 31fb4f573fea4f4ebcceb1f4fcfc478daa0897dc Mon Sep 17 00:00:00 2001 From: haranp Date: Fri, 6 Feb 2009 12:57:36 +0000 Subject: Have 'V' work properly on non-stash-trackable levels. The current behaviour is not optimal; you'll only see the top item in a stack on such levels (even if you're standing right on top of it, or dropped a stack somewhere a turn ago.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8924 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/directn.cc | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'crawl-ref/source/directn.cc') diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 9a10ab20b3..4d314402b2 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -460,18 +460,26 @@ void full_describe_view() if (oid == NON_ITEM) continue; - std::vector items = item_list_in_stash(*ri); - -#ifdef DEBUG_DIAGNOSTICS - if (items.empty()) + if (StashTracker::is_level_untrackable()) { - mprf(MSGCH_ERROR, "No items found in stash, but top item is %s", - mitm[oid].name(DESC_PLAIN).c_str()); - more(); + // On levels with no stashtracker, you can still see the top + // item. + list_items.push_back(mitm[oid]); } -#endif + else + { + const std::vector items = item_list_in_stash(*ri); - list_items.insert(list_items.end(), items.begin(), items.end()); +#ifdef DEBUG_DIAGNOSTICS + if (items.empty()) + { + mprf(MSGCH_ERROR, "No items found in stash, but top item is %s", + mitm[oid].name(DESC_PLAIN).c_str()); + more(); + } +#endif + list_items.insert(list_items.end(), items.begin(), items.end()); + } } // Get monsters via the monster_pane_info, sorted by difficulty. -- cgit v1.2.3-54-g00ecf