summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-22 02:23:08 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-22 02:23:08 +0000
commit91a2a28940b8f81ec3542cfd0c7e8f8a8ea00850 (patch)
treed9f3d95c80c6cb213ffd67685b101c3659c670bb /crawl-ref/source/mapdef.cc
parent918de5413f1417724264fc190d35dce6b35a23cb (diff)
downloadcrawl-ref-91a2a28940b8f81ec3542cfd0c7e8f8a8ea00850.tar.gz
crawl-ref-91a2a28940b8f81ec3542cfd0c7e8f8a8ea00850.zip
Fix Shoal:5 not being generated.
Reinstate the distinction between minivaults and regular vaults when placing maps based on PLACE:, because minivaults cannot be placed before the rest of the level is built. Change Shoal huts to be picked by tag instead of PLACE. Allow DEPTH: to use branch:$. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10591 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r--crawl-ref/source/mapdef.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index 8d9e7408af..b9df39c83f 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -192,6 +192,14 @@ void level_range::set(const std::string &br, int s, int d)
shallowest = s;
deepest = d;
+ if (branch != NUM_BRANCHES)
+ {
+ if (shallowest == -1)
+ shallowest = branches[branch].depth;
+ if (deepest == -1)
+ deepest = branches[branch].depth;
+ }
+
if (deepest < shallowest)
throw make_stringf("Level-range %s:%d-%d is malformed",
br.c_str(), s, d);
@@ -245,6 +253,12 @@ void level_range::parse_depth_range(const std::string &s, int *l, int *h)
return;
}
+ if (s == "$")
+ {
+ *l = *h = -1;
+ return;
+ }
+
std::string::size_type hy = s.find('-');
if (hy == std::string::npos)
{