Logic fixes / Bigger erekir sectors

This commit is contained in:
Anuken
2022-02-13 11:09:27 -05:00
parent 3039a404eb
commit d72153c67a
15 changed files with 147 additions and 31 deletions

View File

@@ -141,16 +141,20 @@ public abstract class PlanetGenerator extends BasicGenerator implements HexMeshe
this.tiles = tiles;
this.seed = seed + baseSeed;
this.sector = sec;
this.width = tiles.width;
this.height = tiles.height;
this.rand.setSeed(sec.id + seed + baseSeed);
TileGen gen = new TileGen();
tiles.each((x, y) -> {
gen.reset();
Vec3 position = sector.rect.project(x / (float)tiles.width, y / (float)tiles.height);
for(int y = 0; y < height; y++){
for(int x = 0; x < width; x++){
gen.reset();
Vec3 position = sector.rect.project(x / (float)tiles.width, y / (float)tiles.height);
genTile(position, gen);
tiles.set(x, y, new Tile(x, y, gen.floor, gen.overlay, gen.block));
});
genTile(position, gen);
tiles.set(x, y, new Tile(x, y, gen.floor, gen.overlay, gen.block));
}
}
generate(tiles);
}