summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/place.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/place.cc')
-rw-r--r--crawl-ref/source/place.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/crawl-ref/source/place.cc b/crawl-ref/source/place.cc
index 2064fb0dfb..a07929b723 100644
--- a/crawl-ref/source/place.cc
+++ b/crawl-ref/source/place.cc
@@ -83,16 +83,22 @@ std::string place_name( unsigned short place, bool long_name,
case LEVEL_LABYRINTH:
return ( long_name ? "a Labyrinth" : "Lab" );
case LEVEL_PORTAL_VAULT:
- // XXX: Using level_type_name here is strictly evil, but
- // packed places lack the information needed for pretty-printing
- // place names for portal vaults, so we must use this out-of-band
- // information.
+ // XXX: This was originally in misc.cc:new_level. It really makes
+ // no sense for it to be there, as there are instances where portal
+ // vaults can use origin elsewhere (death messages, etc), and Note
+ // ::describe calls this anyway. (due)
if (branch == you.level_type
- && !you.level_type_name.empty())
+ && !you.level_type_origin.empty())
{
- return long_name
- ? article_a(you.level_type_name)
- : upcase_first(you.level_type_name_abbrev);
+ std::string desc;
+
+ size_t space = you.level_type_origin.find(" ");
+ if (space == std::string::npos)
+ desc += you.level_type_origin;
+ else
+ desc += you.level_type_origin.substr(space + 1);
+
+ return long_name ? desc : upcase_first(you.level_type_name_abbrev);
}
else
{