summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-20 18:53:40 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-20 18:53:40 +0000
commitf1d9756f8c577019f9446fbf22cec49d41babd28 (patch)
treef37ea2ea8086aa331978e151e336bb9c77cc97b4 /crawl-ref/source/misc.cc
parent683599a4fa6300d6517c0f75d60c028bd62136cc (diff)
downloadcrawl-ref-f1d9756f8c577019f9446fbf22cec49d41babd28.tar.gz
crawl-ref-f1d9756f8c577019f9446fbf22cec49d41babd28.zip
Spadework for ziggurats and other multilevel portal vaults.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7520 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc23
1 files changed, 21 insertions, 2 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index dcf1abb4aa..2498be75ce 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1356,10 +1356,27 @@ static void leaving_level_now()
const std::string newtype =
env.markers.property_at(you.pos(), MAT_ANY, "dst");
+ std::string newname =
+ env.markers.property_at(you.pos(), MAT_ANY, "dstname");
+
dungeon_events.fire_position_event(DET_PLAYER_CLIMBS, you.pos());
dungeon_events.fire_event(DET_LEAVING_LEVEL);
- you.level_type_name = newtype;
+ // Don't clobber level_type_name for stairs in portal vaults.
+ if (you.level_type_name.empty() || !newname.empty()
+ || you.level_type != LEVEL_PORTAL_VAULT)
+ {
+ you.level_type_name = newname;
+ }
+
+ if (you.level_type_tag.empty() || !newtype.empty()
+ || you.level_type != LEVEL_PORTAL_VAULT)
+ {
+ you.level_type_tag = newtype;
+ }
+
+ if (!you.level_type_tag.empty() && you.level_type_name.empty())
+ you.level_type_name = you.level_type_tag;
}
static void set_entry_cause(entry_cause_type default_cause,
@@ -1866,7 +1883,9 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
if (you.level_type != LEVEL_DUNGEON
&& (you.level_type != LEVEL_PANDEMONIUM
- || stair_find != DNGN_TRANSIT_PANDEMONIUM))
+ || stair_find != DNGN_TRANSIT_PANDEMONIUM)
+ && (you.level_type != LEVEL_PORTAL_VAULT
+ || !grid_is_stone_stair(stair_find)))
{
you.level_type = LEVEL_DUNGEON;
}