summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/directn.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-06 12:57:36 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-06 12:57:36 +0000
commit31fb4f573fea4f4ebcceb1f4fcfc478daa0897dc (patch)
treef008a9b1f7d6f864148f303acbae86ceea14899e /crawl-ref/source/directn.cc
parent1ace4250c5ad668810bb86c71b0ef90e3901a68f (diff)
downloadcrawl-ref-31fb4f573fea4f4ebcceb1f4fcfc478daa0897dc.tar.gz
crawl-ref-31fb4f573fea4f4ebcceb1f4fcfc478daa0897dc.zip
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
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r--crawl-ref/source/directn.cc26
1 files changed, 17 insertions, 9 deletions
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<item_def> 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<item_def> 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.