From b27a757b68bf8a1dcbcb9b3a5cfea5c1278c9bb4 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 20 Jul 2007 11:40:25 +0000 Subject: 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 --- crawl-ref/source/direct.cc | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/direct.cc') 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 -- cgit v1.2.3-54-g00ecf