patched chaos in aperiodic tilings

This commit is contained in:
Zeno Rogue 2023-03-23 09:29:07 +01:00
parent 3416f09381
commit de6f5ba97a
3 changed files with 16 additions and 2 deletions

View File

@ -473,6 +473,7 @@ struct hrmap_hat : hrmap {
h1->distance = h->distance - 1;
h1->zebraval = dir == 1;
h->c.connect(dir, h1, 0, false);
if(h1->distance == 0) build_cells(h1);
return h1;
}
// create side connection

View File

@ -2811,7 +2811,8 @@ EX void set_land_for_geometry(cell *c) {
setland(c, currentlands[hrand(isize(currentlands))]);
return;
}
if(ls::patched_chaos() && stdeuc) { /* note: Nil pached chaos done in setLandNil */
/* note: Nil patched chaos done in setLandNil */
if(ls::patched_chaos() && stdeuc) {
cell *c2 = c;
while(true) {
forCellCM(c3, c2) if(cdist50(c3) < cdist50(c2)) { c2 = c3; goto again; }
@ -2822,6 +2823,16 @@ EX void set_land_for_geometry(cell *c) {
c->land = c2->land;
return;
}
if(ls::patched_chaos() && aperiodic) {
cell *c2;
if(hat::in())
c2 = c->master->cmove(0)->cmove(0)->cmove(1)->cmove(1)->c7;
else
c2 = c->master->cmove(0)->cmove(0)->cmove(0)->cmove(0)->cmove(0)->cmove(1)->cmove(1)->cmove(1)->cmove(1)->cmove(1)->c7;
if(!c2->land) setland(c2, currentlands[hrand(isize(currentlands))]);
c->land = c2->land;
return;
}
if(land_structure == lsChaosRW) {
setland_randomwalk(c);
return;

View File

@ -153,10 +153,12 @@ EX void fix_land_structure_choice() {
land_structure = lsChaos;
if(walls_not_implemented() && among(land_structure, lsChaos, lsNoWalls))
land_structure = lsSingle;
if(land_structure == lsPatchedChaos && !(stdeuc || nil || cryst || (euclid && WDIM == 3)))
if(land_structure == lsPatchedChaos && !(stdeuc || nil || cryst || (euclid && WDIM == 3) || aperiodic))
land_structure = lsSingle;
if(closed_or_bounded && !among(land_structure, lsChaosRW, lsTotalChaos, lsSingle))
land_structure = lsSingle;
if(aperiodic && !among(land_structure, lsChaosRW, lsTotalChaos, lsPatchedChaos, lsSingle))
land_structure = lsPatchedChaos;
}
EX bool landUnlockedRPM(eLand n) {