|
From: <gi...@cr...> - 2017-06-19 14:50:13
|
via bbb65ab2d72387d470c1269714bdc354b078a32c (commit)
from 5e5ddd215409b666ceeb85d032d494f2932a6049 (commit)
-----------------------------------------------------------------------
commit bbb65ab2d72387d470c1269714bdc354b078a32c
Author: advil <ra...@gm...>
Date: Mon Jun 19 10:38:58 2017 -0400
Warn on placing encompass vaults in the wrong place with &P (kenran)
This usually fails / crashes if the vault isn't designed for the place.
Then since `wizard_recreate_level` saves (several times!) during its
process, this typically leads to a corrupted save. For example, placing
a bazaar or other portal vault in the dungeon, and in some cases mixing
portal vault types. Even placing depths encompass vaults in D isn't safe
in general in my testing. &L is generally ok, because it has far fewer
checks.
In a few cases this warning is a little over-enthusiastic, e.g. it warns
on placing lemuel_river_lethe on depths 1 even though that is
technically ok. But anyone using wizmode should be able to handle that.
-----------------------------------------------------------------------
Summary of changes:
crawl-ref/source/wiz-dgn.cc | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/crawl-ref/source/wiz-dgn.cc b/crawl-ref/source/wiz-dgn.cc
index 65d0ac2..1c3e464 100644
--- a/crawl-ref/source/wiz-dgn.cc
+++ b/crawl-ref/source/wiz-dgn.cc
@@ -566,6 +566,16 @@ static void debug_load_map_by_name(string name, bool primary)
if (primary)
{
+ if (toplace->orient == MAP_ENCOMPASS
+ && !toplace->is_usable_in(level_id::current())
+ && !yesno("Warning: this is an encompass vault not designed "
+ "for this location; placing it with &P may result in "
+ "crashes and save corruption. Continue?", true, 'y'))
+ {
+ mprf("Ok; try placing with &L or go to the relevant location to "
+ "safely place with &P.");
+ return;
+ }
if (toplace->is_minivault())
you.props["force_minivault"] = toplace->name;
else
--
Dungeon Crawl Stone Soup
|