summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/overmap.cc
diff options
context:
space:
mode:
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;