Testing single-sector planets

This commit is contained in:
Anuken
2021-06-10 19:55:06 -04:00
parent 9e8e0709b5
commit f99b8e35bd
7 changed files with 65 additions and 10 deletions

View File

@@ -1,8 +1,12 @@
package mindustry.content;
import arc.graphics.*;
import arc.math.geom.*;
import arc.util.noise.*;
import mindustry.ctype.*;
import mindustry.graphics.*;
import mindustry.graphics.g3d.*;
import mindustry.graphics.g3d.PlanetGrid.*;
import mindustry.maps.planet.*;
import mindustry.type.*;
@@ -40,8 +44,36 @@ public class Planets implements ContentList{
atmosphereRadIn = 0.02f;
atmosphereRadOut = 0.3f;
tidalLock = true;
orbitSpacing = 0.5f;
totalRadius += 2.4f;
}};
for(int i = 0; i < 4; i++){
new Planet("gier-" + i, erekir, 0.1f){{
hasAtmosphere = false;
alwaysUnlocked = true;
sectors.add(new Sector(this, Ptile.empty));
camRadius = 0.43f;
//new SectorPreset(name + "-sector", this, 0){{
//}};
meshLoader = () -> new HexMesh(this, new HexMesher(){
Simplex sim = new Simplex(id);
@Override
public float getHeight(Vec3 position){
return (float)sim.octaveNoise3D(2, 0.6, 0.3f, position.x, position.y, position.z) * 13f;
}
@Override
public Color getColor(Vec3 position){
return Pal.gray;
}
}, 2, Shaders.planet);
}};
}
tantros = new Planet("tantros", sun, 1, 2){{
generator = new TantrosPlanetGenerator();
meshLoader = () -> new HexMesh(this, 4);