summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/place.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-18 14:57:52 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-18 14:57:52 +0000
commit564115dd01a10153ad421df67b1b008fe514cf0c (patch)
tree6eed91aab5f04e09745bb9de14bc9ab3ef98f281 /crawl-ref/source/place.cc
parentacb58afeec9184c1910f705da7bae843b9fc14a8 (diff)
downloadcrawl-ref-564115dd01a10153ad421df67b1b008fe514cf0c.tar.gz
crawl-ref-564115dd01a10153ad421df67b1b008fe514cf0c.zip
Show place as "Sewer" in the HUD and in character dumps for the sewer portal vaults (portal vault entry marker's dst field is used as the name). Portal vault entrance is replaced with stone arch on use.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7474 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/place.cc')
-rw-r--r--crawl-ref/source/place.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/crawl-ref/source/place.cc b/crawl-ref/source/place.cc
index 2c3683a1fa..7e13141cc9 100644
--- a/crawl-ref/source/place.cc
+++ b/crawl-ref/source/place.cc
@@ -84,12 +84,21 @@ std::string place_name( unsigned short place, bool long_name,
case LEVEL_LABYRINTH:
return ( long_name ? "a Labyrinth" : "Lab" );
case LEVEL_PORTAL_VAULT:
- // FIXME: While there are no further portal vaults, declare all
- // portal vaults as bazaars.
-// if (you.level_type_name == "bazaar")
- return ( long_name ? "a Bazaar" : "Bazaar" );
-
-// return ( long_name ? "a Portal Chamber" : "Port" );
+ // 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.
+ if (branch == you.level_type
+ && !you.level_type_name.empty())
+ {
+ return long_name
+ ? article_a(you.level_type_name)
+ : upcase_first(you.level_type_name);
+ }
+ else
+ {
+ return long_name ? "a Portal Chamber" : "Port";
+ }
default:
return ( long_name ? "Buggy Badlands" : "Bug" );
}