summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/maps.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r--crawl-ref/source/maps.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index 859e6fe211..dbb8a4d501 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -316,6 +316,17 @@ int find_map_by_name(const std::string &name)
return (-1);
}
+std::vector<std::string> find_map_matches(const std::string &name)
+{
+ std::vector<std::string> matches;
+
+ for (unsigned i = 0, size = vdefs.size(); i < size; ++i)
+ if (vdefs[i].name.find(name) != std::string::npos)
+ matches.push_back(vdefs[i].name);
+ return (matches);
+}
+
+
// Returns a map for which PLACE: matches the given place.
int random_map_for_place(const level_id &place, bool want_minivault)
{