This commit is contained in:
Anuken
2020-12-29 10:13:27 -05:00
parent add3fd9fb3
commit 6357c17f8a
6 changed files with 16 additions and 14 deletions

View File

@@ -427,12 +427,14 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
//actually place the part
if(part != null && BaseGenerator.tryPlace(part, x, y, Team.derelict, (cx, cy) -> {
Tile other = tiles.getn(cx, cy);
other.setOverlay(Blocks.oreScrap);
for(int j = 1; j <= 2; j++){
for(Point2 p : Geometry.d8){
Tile t = tiles.get(cx + p.x*j, cy + p.y*j);
if(t != null && t.floor().hasSurface() && rand.chance(j == 1 ? 0.4 : 0.2)){
t.setOverlay(Blocks.oreScrap);
if(other.floor().hasSurface()){
other.setOverlay(Blocks.oreScrap);
for(int j = 1; j <= 2; j++){
for(Point2 p : Geometry.d8){
Tile t = tiles.get(cx + p.x*j, cy + p.y*j);
if(t != null && t.floor().hasSurface() && rand.chance(j == 1 ? 0.4 : 0.2)){
t.setOverlay(Blocks.oreScrap);
}
}
}
}