summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/maps.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-19 21:23:25 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-19 21:23:25 +0000
commit9726d74a32cd63e2d7e317d8ae592c4b05773f3d (patch)
tree9b93e1eac9d7319735aa8518682c1add7e4f1db3 /crawl-ref/source/maps.cc
parent74d429f39c7b29c023d920e5eb994154d6e980f0 (diff)
downloadcrawl-ref-9726d74a32cd63e2d7e317d8ae592c4b05773f3d.tar.gz
crawl-ref-9726d74a32cd63e2d7e317d8ae592c4b05773f3d.zip
Remove labyrinth entry placement from dungeon.cc, added support for "luniq" and "extra" tags.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7511 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r--crawl-ref/source/maps.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index e0b0909c44..31386ff2e3 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -327,8 +327,11 @@ static bool map_has_no_tags(const map_def &map, I begin, I end)
static bool vault_unforbidden(const map_def &map)
{
return (you.uniq_map_names.find(map.name) == you.uniq_map_names.end()
+ && Level_Unique_Maps.find(map.name) == Level_Unique_Maps.end()
&& map_has_no_tags(map, you.uniq_map_tags.begin(),
- you.uniq_map_tags.end()));
+ you.uniq_map_tags.end())
+ && map_has_no_tags(map, Level_Unique_Tags.begin(),
+ Level_Unique_Tags.end()));
}
static bool map_matches_layout_type(const map_def &map)
@@ -387,9 +390,10 @@ public:
}
static map_selector by_tag(const std::string &tag, bool mini,
- bool check_depth)
+ bool check_depth,
+ const level_id &place = level_id::current())
{
- return map_selector(map_selector::TAG, level_id::current(), tag,
+ return map_selector(map_selector::TAG, place, tag,
mini, check_depth);
}
@@ -558,8 +562,9 @@ static int _random_map_in_list(const map_selector &sel,
// a lookup for that tag.
if (!chance_tag.empty())
{
- map_selector msel = map_selector::by_tag(sel.tag, sel.mini,
- sel.check_depth);
+ map_selector msel = map_selector::by_tag(chance_tag, sel.mini,
+ sel.check_depth,
+ sel.place);
msel.ignore_chance = true;
return _random_map_by_selector(msel);
}