summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapmark.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-26 18:34:19 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-26 18:34:19 +0000
commit21cfdbc39885c510cf562bbd86f5f29cf8e38b3d (patch)
treeb91489672cc2bb9b425425f53f07d498d07cd2e5 /crawl-ref/source/mapmark.cc
parent851436e3e120efac69cb0cdb443a4cc3f30976d4 (diff)
downloadcrawl-ref-21cfdbc39885c510cf562bbd86f5f29cf8e38b3d.tar.gz
crawl-ref-21cfdbc39885c510cf562bbd86f5f29cf8e38b3d.zip
Attempt to place ziggurat loot vault inside the ziggurat. If the vault doesn't fit, we fall back to generating the loot in the open.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7639 c06c8d41-db1a-0410-9941-cceddc491573
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);
+}