diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-08 16:33:55 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-08 16:33:55 +0000 |
commit | 64eb39919e167b9443b88943bbf0e1f3ba63f61c (patch) | |
tree | c67a5ae6aac361ea08445aef0773c74bcab99e28 /crawl-ref/source/mapdef.cc | |
parent | 3e5eae658a2dd7acbd5584f4a6104ba99e7de275 (diff) | |
download | crawl-ref-64eb39919e167b9443b88943bbf0e1f3ba63f61c.tar.gz crawl-ref-64eb39919e167b9443b88943bbf0e1f3ba63f61c.zip |
Fixed inappropriate maps being selected for dungeon levels.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1803 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r-- | crawl-ref/source/mapdef.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc index 70b128a6d3..fbc7cd4113 100644 --- a/crawl-ref/source/mapdef.cc +++ b/crawl-ref/source/mapdef.cc @@ -1645,6 +1645,12 @@ bool map_def::has_tag_prefix(const std::string &prefix) const && tags.find(" " + prefix) != std::string::npos; } +bool map_def::has_tag_suffix(const std::string &suffix) const +{ + return !tags.empty() && !suffix.empty() + && tags.find(suffix + " ") != std::string::npos; +} + keyed_mapspec *map_def::mapspec_for_key(int key) { keyed_specs::iterator i = keyspecs.find(key); |