summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stash.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/stash.cc')
-rw-r--r--crawl-ref/source/stash.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc
index 691f387289..d965954a3a 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);
}