summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@wybt.net>2014-06-28 19:50:42 +0400
committerVsevolod Kozlov <zaba@wybt.net>2014-06-28 19:50:42 +0400
commit218910543e562177b12e3a793e2962d484534990 (patch)
tree3e95810cab3a4e80e63037292aab833db34881f3 /crawl-ref/source/mapdef.cc
parentcd3db6f1a5799e141ea93bf00c9560816bda679f (diff)
downloadcrawl-ref-218910543e562177b12e3a793e2962d484534990.tar.gz
crawl-ref-218910543e562177b12e3a793e2962d484534990.zip
Enforce a 1x1 size constraint on can_overwrite vaults.
Using it for anything larger would be unwise anyway.
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r--crawl-ref/source/mapdef.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index 765127e646..4016413282 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -2845,6 +2845,11 @@ string map_def::validate_map_def(const depth_ranges &default_depths)
return err;
}
+ if (has_tag("can_overwrite") && (map.width() != 1 || map.height() != 1))
+ {
+ return "Map tagged 'can_overwrite' must be 1x1";
+ }
+
// Abyssal vaults have additional size and orientation restrictions.
if (has_tag("abyss") || has_tag("abyss_rune"))
{