From 0e472a37cd47225bb6660aa9f7d12320f7cd4582 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 21 Sep 2009 17:54:43 +0000 Subject: * Fix 2862312: examination of items in shops not working after buying something * FR 2836364 : Make controlled blink contaminate the player. * Fix 2841232: display "very slow" in the % screen. * FR 2858960 : Re-add mouseover descriptions for previously seen (but not detected) features out of sight, and for plain floor the stash description like when using 'x'. * Disallow placement of corpses within walls, and allow rock worms to leave corpses elsewhere. * Minor tweaks to the documentation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10766 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/stash.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/stash.cc') diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc index f795d2c1b0..836cb074c2 100644 --- a/crawl-ref/source/stash.cc +++ b/crawl-ref/source/stash.cc @@ -123,7 +123,7 @@ bool is_stash(int x, int y) return (false); } -void describe_stash(int x, int y) +std::string get_stash_desc(int x, int y) { LevelStashes *ls = StashTrack.find_current_level(); if (ls) @@ -133,9 +133,17 @@ void describe_stash(int x, int y) { const std::string desc = s->description(); if (!desc.empty()) - mprf(MSGCH_EXAMINE_FILTER, "[Stash: %s]", desc.c_str()); + return ("[Stash: " + desc + "]"); } } + return ""; +} + +void describe_stash(int x, int y) +{ + std::string desc = get_stash_desc(x, y); + if (!desc.empty()) + mpr(desc.c_str(), MSGCH_EXAMINE_FILTER); } -- cgit v1.2.3-54-g00ecf