.
This commit is contained in:
@@ -8,7 +8,7 @@ import arc.util.*;
|
||||
import arc.util.noise.*;
|
||||
import mindustry.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.maps.zonegen.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.*;
|
||||
|
||||
@@ -120,7 +120,10 @@ public class TestPlanetGenerator implements PlanetGenerator{
|
||||
tiles.each((x, y) -> tiles.get(x, y).setBlock(!read.get(x, y) ? Blocks.air : tiles.get(x, y).floor().wall));
|
||||
distort(0.009f, 12f);
|
||||
|
||||
tiles.get(tiles.width /2, tiles.height /2).setBlock(Blocks.coreShard, Team.sharded);
|
||||
OvergrowthGenerator gen = new OvergrowthGenerator(tiles.width, tiles.height);
|
||||
gen.decorate(tiles);
|
||||
|
||||
//tiles.get(tiles.width /2, tiles.height /2).setBlock(Blocks.coreShard, Team.sharded);
|
||||
}
|
||||
|
||||
void distort(float scl, float mag){
|
||||
|
||||
@@ -23,10 +23,12 @@ public class OvergrowthGenerator extends BasicGenerator{
|
||||
ores(tiles);
|
||||
//terrain(tiles, Blocks.sporePine, 70f, 1.4f, 1f);
|
||||
|
||||
int rand = 40;
|
||||
int border = 25;
|
||||
int spawnX = Mathf.clamp(30 + Mathf.range(rand), border, width - border), spawnY = Mathf.clamp(30 + Mathf.range(rand), border, height - border);
|
||||
int endX = Mathf.clamp(width - 30 + Mathf.range(rand), border, width - border), endY = Mathf.clamp(height - 30 + Mathf.range(rand), border, height - border);
|
||||
//int rand = 40;
|
||||
//int border = 25;
|
||||
//int spawnX = Mathf.clamp(30 + Mathf.range(rand), border, width - border), spawnY = Mathf.clamp(30 + Mathf.range(rand), border, height - border);
|
||||
//int endX = Mathf.clamp(width - 30 + Mathf.range(rand), border, width - border), endY = Mathf.clamp(height - 30 + Mathf.range(rand), border, height - border);
|
||||
|
||||
int radius = (int)(width / 2 / Mathf.sqrt3);
|
||||
|
||||
brush(tiles, pathfind(tiles, spawnX, spawnY, endX, endY, tile -> (tile.solid() ? 5f : 0f) + (float)sim.octaveNoise2D(1, 1, 1f / 50f, tile.x, tile.y) * 50, manhattan), 6);
|
||||
brush(tiles, pathfind(tiles, spawnX, spawnY, endX, endY, tile -> (tile.solid() ? 4f : 0f) + (float)sim.octaveNoise2D(1, 1, 1f / 90f, tile.x+999, tile.y) * 70, manhattan), 5);
|
||||
@@ -40,6 +42,7 @@ public class OvergrowthGenerator extends BasicGenerator{
|
||||
//scatter(tiles, Blocks.sporePine, Blocks.whiteTreeDead, 1f);
|
||||
|
||||
tiles.getn(endX, endY).setOverlay(Blocks.spawn);
|
||||
loadout = Loadouts.advancedShard;
|
||||
schematics.placeLoadout(loadout, spawnX, spawnY);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user