Fixed tree color
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 281 KiB After Width: | Height: | Size: 281 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 511 KiB After Width: | Height: | Size: 511 KiB |
|
Before Width: | Height: | Size: 350 KiB After Width: | Height: | Size: 350 KiB |
@@ -79,10 +79,10 @@ public abstract class BasicGenerator extends RandomGenerator{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void overlay(Tile[][] tiles, Block floor, Block block, int octaves, float falloff, float scl, float threshold){
|
public void overlay(Tile[][] tiles, Block floor, Block block, float chance, int octaves, float falloff, float scl, float threshold){
|
||||||
sim.setSeed(Mathf.random(99999));
|
sim.setSeed(Mathf.random(99999));
|
||||||
pass(tiles, (x, y) -> {
|
pass(tiles, (x, y) -> {
|
||||||
if(sim.octaveNoise2D(octaves, falloff, 1f / scl, x, y) > threshold && tiles[x][y].floor() == floor){
|
if(sim.octaveNoise2D(octaves, falloff, 1f / scl, x, y) > threshold && Mathf.chance(chance) && tiles[x][y].floor() == floor){
|
||||||
ore = block;
|
ore = block;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class DesertWastesGenerator extends BasicGenerator{
|
|||||||
noise(tiles, Blocks.darksand, Blocks.duneRocks, 5, 0.7f, 120f, 0.5f);
|
noise(tiles, Blocks.darksand, Blocks.duneRocks, 5, 0.7f, 120f, 0.5f);
|
||||||
|
|
||||||
tech(tiles);
|
tech(tiles);
|
||||||
overlay(tiles, Blocks.sand, Blocks.pebbles, 5, 0.8f, 30f, 0.6f);
|
overlay(tiles, Blocks.sand, Blocks.pebbles, 0.15f, 5, 0.8f, 30f, 0.62f);
|
||||||
//scatter(tiles, Blocks.sandRocks, Blocks.creeptree, 1f);
|
//scatter(tiles, Blocks.sandRocks, Blocks.creeptree, 1f);
|
||||||
|
|
||||||
tiles[endX][endY].setBlock(Blocks.spawn);
|
tiles[endX][endY].setBlock(Blocks.spawn);
|
||||||
|
|||||||
@@ -12,14 +12,11 @@ public class TreeBlock extends Block{
|
|||||||
super(name);
|
super(name);
|
||||||
solid = true;
|
solid = true;
|
||||||
layer = Layer.power;
|
layer = Layer.power;
|
||||||
//cacheLayer = CacheLayer.walls;
|
|
||||||
expanded = true;
|
expanded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawLayer(Tile tile){
|
public void drawLayer(Tile tile){
|
||||||
Draw.colorl(1f - tile.getRotation() / 4f);
|
|
||||||
Draw.rect(region, tile.drawx(), tile.drawy(), Mathf.randomSeed(tile.pos(), 0, 4) * 90);
|
Draw.rect(region, tile.drawx(), tile.drawy(), Mathf.randomSeed(tile.pos(), 0, 4) * 90);
|
||||||
Draw.color();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||