diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-20 11:40:25 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-20 11:40:25 +0000 |
commit | b27a757b68bf8a1dcbcb9b3a5cfea5c1278c9bb4 (patch) | |
tree | 1f3ba836c9d1cec2e625c6a4382f5babe32a8463 /crawl-ref/source/direct.cc | |
parent | ab679653017c1d661572cf34a62bf5ddf7c1304e (diff) | |
download | crawl-ref-b27a757b68bf8a1dcbcb9b3a5cfea5c1278c9bb4.tar.gz crawl-ref-b27a757b68bf8a1dcbcb9b3a5cfea5c1278c9bb4.zip |
Updated travel to allow it to use rock stairs.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1898 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/direct.cc')
-rw-r--r-- | crawl-ref/source/direct.cc | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc index b2c3382803..745f662aea 100644 --- a/crawl-ref/source/direct.cc +++ b/crawl-ref/source/direct.cc @@ -1526,6 +1526,21 @@ static void describe_monster_weapon(monsters *mons) mpr(msg.str().c_str()); } +#ifdef DEBUG_DIAGNOSTICS +static std::string stair_destination_description(const coord_def &pos) +{ + if (LevelInfo *linf = travel_cache.find_level_info(level_id::current())) + { + const stair_info *si = linf->get_stair(pos); + if (si) + return (" " + si->describe()); + else if (is_stair(grd(pos))) + return (" (unknown stair)"); + } + return (""); +} +#endif + static void describe_cell(int mx, int my) { bool mimic_item = false; @@ -1648,10 +1663,13 @@ static void describe_cell(int mx, int my) std::string marker; if (map_marker *mark = env.find_marker(coord_def(mx, my), MAT_ANY)) marker = " (" + mark->describe() + ")"; - mprf("(%d,%d): %s - %s%s", mx, my, + const std::string traveldest = + stair_destination_description(coord_def(mx, my)); + mprf("(%d,%d): %s - %s%s%s", mx, my, stringize_glyph(get_screen_glyph(mx, my)).c_str(), feature_desc.c_str(), - marker.c_str()); + marker.c_str(), + traveldest.c_str()); #else mpr(feature_desc.c_str()); #endif |