summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/overmap.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-25 18:47:28 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-25 18:47:28 -0700
commit0c229026108e080afa9774f5a77f28c29987e3e0 (patch)
tree335c8d066aba4ded71f441be862edd2864d6715f /crawl-ref/source/overmap.cc
parentf9b1762f8faa62baad284734919e155d852d48ed (diff)
downloadcrawl-ref-0c229026108e080afa9774f5a77f28c29987e3e0.tar.gz
crawl-ref-0c229026108e080afa9774f5a77f28c29987e3e0.zip
FR 2839615: comment on # of altars/shops sensed
FR: Magic mapping now comments on the number of altars and shops/portals sensed. Also, take a note when a notable feature is first seen.
Diffstat (limited to 'crawl-ref/source/overmap.cc')
-rw-r--r--crawl-ref/source/overmap.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/overmap.cc b/crawl-ref/source/overmap.cc
index 4c66e7cdde..2a2ae64f63 100644
--- a/crawl-ref/source/overmap.cc
+++ b/crawl-ref/source/overmap.cc
@@ -186,6 +186,19 @@ bool overmap_knows_portal(dungeon_feature_type portal)
return (false);
}
+int overmap_knows_num_portals(dungeon_feature_type portal)
+{
+ int num = 0;
+ for ( portal_map_type::const_iterator pl_iter = portals_present.begin();
+ pl_iter != portals_present.end(); ++pl_iter )
+ {
+ if (portal_to_feature(pl_iter->second) == portal)
+ num++;
+ }
+
+ return (num);
+}
+
static std::string _portals_description_string()
{
std::string disp;