summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapmark.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/mapmark.cc')
-rw-r--r--crawl-ref/source/mapmark.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/mapmark.cc b/crawl-ref/source/mapmark.cc
index 1d92b09c14..7399515473 100644
--- a/crawl-ref/source/mapmark.cc
+++ b/crawl-ref/source/mapmark.cc
@@ -819,3 +819,17 @@ bool feature_marker_at(const coord_def &pos, dungeon_feature_type feat)
}
return (false);
}
+
+const coord_def find_marker_prop(const std::string &prop,
+ const std::string &expected)
+{
+ for (rectangle_iterator i(0, 0); i; ++i)
+ {
+ const std::string value =
+ env.markers.property_at(*i, MAT_ANY, prop);
+ if (!value.empty() && (expected.empty() || value == expected))
+ return (*i);
+ }
+ const coord_def nowhere(-1, -1);
+ return (nowhere);
+}