Partial 7.0 merge - API preview

This commit is contained in:
Anuken
2021-06-02 11:08:08 -04:00
parent ea75a357ca
commit 28b235ef07
531 changed files with 12356 additions and 6286 deletions

View File

@@ -115,7 +115,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
tile.floor = getBlock(position);
tile.block = tile.floor.asFloor().wall;
if(rid.getValue(position.x, position.y, position.z, 22) > 0.32){
if(rid.getValue(position.x, position.y, position.z, 22) > 0.31){
tile.block = Blocks.air;
}
}
@@ -162,12 +162,11 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
}
void connect(Room to){
if(connected.contains(to)) return;
if(!connected.add(to)) return;
connected.add(to);
float nscl = rand.random(20f, 60f);
int stroke = rand.random(4, 12);
brush(pathfind(x, y, to.x, to.y, tile -> (tile.solid() ? 5f : 0f) + noise(tile.x, tile.y, 1, 1, 1f / nscl) * 60, Astar.manhattan), stroke);
float nscl = rand.random(100f, 140f);
int stroke = rand.random(3, 9);
brush(pathfind(x, y, to.x, to.y, tile -> (tile.solid() ? 5f : 0f) + noise(tile.x, tile.y, 2, 0.4, 1f / nscl) * 500, Astar.manhattan), stroke);
}
}
@@ -219,7 +218,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
for(int j = 0; j < enemySpawns; j++){
float enemyOffset = rand.range(60f);
Tmp.v1.set(cx - width/2, cy - height/2).rotate(180f + enemyOffset).add(width/2, height/2);
Room espawn = new Room((int)Tmp.v1.x, (int)Tmp.v1.y, rand.random(8, 15));
Room espawn = new Room((int)Tmp.v1.x, (int)Tmp.v1.y, rand.random(8, 16));
roomseq.add(espawn);
enemies.add(espawn);
}

View File

@@ -1,32 +0,0 @@
package mindustry.maps.planet;
import arc.graphics.*;
import arc.math.*;
import arc.math.geom.*;
import mindustry.content.*;
import mindustry.game.*;
import mindustry.maps.generators.*;
public class TantrosPlanetGenerator extends PlanetGenerator{
Color c1 = Color.valueOf("5057a6"), c2 = Color.valueOf("272766"), out = new Color();
@Override
public float getHeight(Vec3 position){
return 0;
}
@Override
public Color getColor(Vec3 position){
float depth = (float)noise.octaveNoise3D(2, 0.56, 1.7f, position.x, position.y, position.z) / 2f;
return c1.write(out).lerp(c2, Mathf.clamp(Mathf.round(depth, 0.15f))).a(0.6f);
}
@Override
protected void generate(){
pass((x, y) -> {
floor = Blocks.deepwater;
});
Schematics.placeLaunchLoadout(width / 2, height / 2);
}
}