summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-14 10:58:08 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-14 10:58:08 +0000
commit5f0047a46771cbb691ed76feb3a66d8bbbaf674d (patch)
tree42a42851c04160c9975058a8bad2f807e8005bf7 /crawl-ref/source/travel.cc
parent1de6c3e73bc19e4c7c6573ce3be9d77befd4cf02 (diff)
downloadcrawl-ref-5f0047a46771cbb691ed76feb3a66d8bbbaf674d.tar.gz
crawl-ref-5f0047a46771cbb691ed76feb3a66d8bbbaf674d.zip
Another round of patches, namely:
1794580, 1794576 and 1794376 by zelgadis, and 1794388, 1794372, 1794368 by dolorous. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2086 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r--crawl-ref/source/travel.cc28
1 files changed, 27 insertions, 1 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 67e9d656b4..381aa76727 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -1869,7 +1869,7 @@ static std::vector<branch_type> get_branches(bool (*selector)(const Branch &))
static bool is_valid_branch(const Branch &br)
{
- return (!!br.shortname);
+ return (br.shortname != NULL && br.depth != -1);
}
static int prompt_travel_branch(int prompt_flags)
@@ -1970,7 +1970,33 @@ static int prompt_travel_branch(int prompt_flags)
for (int i = 0, count = br.size(); i < count; ++i)
{
if (toupper(keyin) == branches[br[i]].travel_shortcut)
+ {
+#ifdef WIZARD
+ Branch &target = branches[br[i]];
+ std::string msg = "";
+
+ if (target.startdepth == -1
+ && (i == BRANCH_SWAMP || i == BRANCH_SHOALS ))
+ {
+ msg += "Branch not generated this game. ";
+ }
+
+ if (target.entry_stairs == NUM_FEATURES
+ && br[i] != BRANCH_MAIN_DUNGEON)
+ {
+ msg += "Branch has no entry stairs. ";
+ }
+
+ if (msg != "")
+ {
+ msg += "Go there anyways?";
+ if(!yesno(msg.c_str()))
+ return (ID_CANCEL);
+ }
+#endif
+
return (br[i]);
+ }
}
// Possibly a waypoint number?