From 72466053299ff1568fcce757a0d2256e776a765f Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 12 Oct 2019 13:47:41 +0200 Subject: [PATCH] do not do walls if walls not implemented --- bigstuff.cpp | 6 ++++++ geom-exp.cpp | 2 +- landlock.cpp | 4 ++++ menus.cpp | 1 + system.cpp | 4 +++- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/bigstuff.cpp b/bigstuff.cpp index 59942bac..9ee693f3 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -1371,6 +1371,10 @@ EX bool good_for_wall(cell *c) { if(WDIM == 3) return true; return pseudohept(c); } + +EX bool walls_not_implemented() { + return WDIM == 3 && (cgflags & qIDEAL); + } EX void buildBigStuff(cell *c, cell *from) { if(sphere || quotient || nonisotropic || (penrose && !binarytiling) || experimental) return; @@ -1383,6 +1387,8 @@ EX void buildBigStuff(cell *c, cell *from) { if(hybri) ; /* Great Walls generated via the underlying geometry */ + else if(walls_not_implemented()); // walls not implemented here + else if(geometry == gNormal && celldist(c) < 3 && !GOLDBERG) { if(top_land && c == cwt.at->master->move(3)->c7) { buildBarrierStrong(c, 6, true, top_land); diff --git a/geom-exp.cpp b/geom-exp.cpp index d82c3ba3..78fed3ca 100644 --- a/geom-exp.cpp +++ b/geom-exp.cpp @@ -345,7 +345,7 @@ void ge_land_selection() { }); } dialog::addBreak(50); - if(chaosUnlocked && !quotient && !euclid && !sphere) { + if(chaosUnlocked && !quotient && !euclid && !sphere && !walls_not_implemented()) { dialog::addItem(XLAT("Chaos mode"), '1'); dialog::add_action(dual::mayboth([] { if(chaosUnlocked) dialog::do_if_confirmed([] { diff --git a/landlock.cpp b/landlock.cpp index 3d75113a..a0efb901 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -659,6 +659,7 @@ namespace lv { land_validity_t sloppy_pattern = {1, q1 | one_and_half, "Somewhat sloppy pattern."}; land_validity_t no_fractal_landscapes = {1, q1 | one_and_half, "Fractal landscapes not implemented in this geometry."}; land_validity_t simplified_walls = { 1, q1, "Only simplified walls implemented."}; + land_validity_t no_walls = { 0, q0, "No walls implemented."}; land_validity_t disabled = {0, q0, "This land has been disabled with compilation flags."}; land_validity_t pattern_special = {3, qm3, "Special pattern implemented for this geometry."}; land_validity_t not_3d = {0, q0, "This land does not make much sense in 3D."}; @@ -680,6 +681,9 @@ EX land_validity_t& land_validity(eLand l) { using namespace lv; + if(walls_not_implemented() && isCrossroads(l)) + return no_walls; + if(hybri || hybrid::pmap) { if(among(l, laPrincessQuest, laPrairie, laMirrorOld, laMirror, laDual, laWarpCoast, laKraken, laBrownian, laWhirlpool, laWestWall, laHive, laClearing, laWhirlwind, laBlizzard, laBull, laTerracotta, laCrossroads5, laEndorian, laDungeon, laMountain)) diff --git a/menus.cpp b/menus.cpp index 10db046f..fb248e7a 100644 --- a/menus.cpp +++ b/menus.cpp @@ -496,6 +496,7 @@ EX void show_chaos() { if(chaosUnlocked) for(int a=1; a<5; a++) { if(a > 1 && ISWEB) continue; + if(a == 1 && walls_not_implemented()) continue; dialog::addBoolItem( a == 1 ? XLATN("Crossroads IV") : a == 2 ? XLATN("Palace") : diff --git a/system.cpp b/system.cpp index 5eb1d8dd..30063bca 100644 --- a/system.cpp +++ b/system.cpp @@ -1197,7 +1197,9 @@ EX void set_geometry(eGeometry target) { } geometry = target; - if(chaosmode && bounded) chaosmode = false; + if(chaosmode && bounded) chaosmode = 0; + if(chaosmode == 1 && walls_not_implemented()) chaosmode = 0; + if(euclid6) variation = eVariation::bitruncated; #if CAP_IRR if(IRREGULAR) variation = eVariation::bitruncated;