Name cleanup
|
Before Width: | Height: | Size: 432 B After Width: | Height: | Size: 432 B |
|
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 288 B |
|
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
|
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 340 B |
|
|
@ -391,3 +391,4 @@
|
|||
63342=beryllic-stone-wall|block-beryllic-stone-wall-ui
|
||||
63341=beryllic-boulder|block-beryllic-boulder-ui
|
||||
63340=carbon-boulder|block-carbon-boulder-ui
|
||||
63339=carbon-stone|block-carbon-stone-ui
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class Blocks implements ContentList{
|
|||
stoneWall, dirtWall, sporeWall, iceWall, daciteWall, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
|
||||
redweed, purbush, coralChunk, yellowCoral,
|
||||
regolithWall, yellowStoneWall, rhyoliteWall, carbonWall, redIceWall, ferricStoneWall, beryllicStoneWall,
|
||||
ferricStone, ferricCraters, graphiticStone, beryllicStone,
|
||||
ferricStone, ferricCraters, carbonStone, beryllicStone,
|
||||
iceSnow, sandWater, darksandWater, duneWall, sandWall, moss, sporeMoss, shale, shaleWall, grass, salt,
|
||||
shaleBoulder, sandBoulder, daciteBoulder, boulder, snowBoulder, basaltBoulder, carbonBoulder, ferricBoulder, beryllicBoulder,
|
||||
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor4, metalFloor5, basalt, magmarock, hotrock, snowWall, saltWall,
|
||||
|
|
@ -307,7 +307,7 @@ public class Blocks implements ContentList{
|
|||
attributes.set(Attribute.water, -1f);
|
||||
}};
|
||||
|
||||
graphiticStone = new Floor("graphitic-stone"){{
|
||||
carbonStone = new Floor("carbon-stone"){{
|
||||
attributes.set(Attribute.water, -1f);
|
||||
variants = 4;
|
||||
}};
|
||||
|
|
@ -397,7 +397,7 @@ public class Blocks implements ContentList{
|
|||
}};
|
||||
|
||||
carbonWall = new StaticWall("carbon-wall"){{
|
||||
graphiticStone.asFloor().wall = this;
|
||||
carbonStone.asFloor().wall = this;
|
||||
}};
|
||||
|
||||
ferricStoneWall = new StaticWall("ferric-stone-wall"){{
|
||||
|
|
@ -487,7 +487,7 @@ public class Blocks implements ContentList{
|
|||
|
||||
carbonBoulder = new Prop("carbon-boulder"){{
|
||||
variants = 2;
|
||||
graphiticStone.asFloor().decoration = this;
|
||||
carbonStone.asFloor().decoration = this;
|
||||
}};
|
||||
|
||||
ferricBoulder = new Prop("ferric-boulder"){{
|
||||
|
|
|
|||
|
|
@ -69,14 +69,18 @@ public class Planets implements ContentList{
|
|||
|
||||
meshLoader = () -> {
|
||||
Seq<GenericMesh> meshes = new Seq<>();
|
||||
Color color = Color.valueOf("57504b");
|
||||
Color color = Blocks.ferricStoneWall.mapColor;
|
||||
Rand rand = new Rand(2);
|
||||
|
||||
meshes.add(new NoiseMesh(this, 0, 2, color, radius, 2, 0.55f, 0.45f, 14f));
|
||||
int am = rand.random(3, 7);
|
||||
|
||||
//TODO gier variants with different names and different resource distributions
|
||||
for(int j = 0; j < am; j++){
|
||||
meshes.add(new MatMesh(new NoiseMesh(this, j + 1, 1, color, 0.022f + rand.random(0.039f), 2, 0.6f, 0.38f, 20f), new Mat3D().setToTranslation(Tmp.v31.setToRandomDirection(rand).setLength(rand.random(0.44f, 1.4f)))));
|
||||
meshes.add(new MatMesh(
|
||||
new NoiseMesh(this, j + 1, 1, 0.022f + rand.random(0.039f), 2, 0.6f, 0.38f, 20f,
|
||||
color, Blocks.carbonWall.mapColor, 3, 0.6f, 0.38f, 0.6f),
|
||||
new Mat3D().setToTranslation(Tmp.v31.setToRandomDirection(rand).setLength(rand.random(0.44f, 1.4f)))));
|
||||
}
|
||||
|
||||
return new MultiMesh(meshes.toArray(GenericMesh.class));
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public class NoiseMesh extends HexMesh{
|
|||
public NoiseMesh(Planet planet, int seed, int divisions, Color color, float radius, int octaves, float persistence, float scale, float mag){
|
||||
this.planet = planet;
|
||||
this.shader = Shaders.planet;
|
||||
this.mesh = MeshBuilder.buildHex(new HexMesher(){
|
||||
this.mesh = MeshBuilder.buildHex(new HexMesher(){
|
||||
@Override
|
||||
public float getHeight(Vec3 position){
|
||||
return Simplex.noise3d(planet.id + seed, octaves, persistence, scale, 5f + position.x, 5f + position.y, 5f + position.z) * mag;
|
||||
|
|
@ -23,4 +23,21 @@ public class NoiseMesh extends HexMesh{
|
|||
}
|
||||
}, divisions, false, radius, 0.2f);
|
||||
}
|
||||
|
||||
/** Two-color variant. */
|
||||
public NoiseMesh(Planet planet, int seed, int divisions, float radius, int octaves, float persistence, float scale, float mag, Color color1, Color color2, int coct, float cper, float cscl, float cthresh){
|
||||
this.planet = planet;
|
||||
this.shader = Shaders.planet;
|
||||
this.mesh = MeshBuilder.buildHex(new HexMesher(){
|
||||
@Override
|
||||
public float getHeight(Vec3 position){
|
||||
return Simplex.noise3d(planet.id + seed, octaves, persistence, scale, 5f + position.x, 5f + position.y, 5f + position.z) * mag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color getColor(Vec3 position){
|
||||
return Simplex.noise3d(planet.id + seed + 1, coct, cper, cscl, 5f + position.x, 5f + position.y, 5f + position.z) > cthresh ? color2 : color1;
|
||||
}
|
||||
}, divisions, false, radius, 0.2f);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class AsteroidGenerator extends BlankPlanetGenerator{
|
|||
void asteroid(int ax, int ay, int radius){
|
||||
Floor floor = (
|
||||
rand.chance(iceChance) ? Blocks.ice :
|
||||
rand.chance(carbonChance) ? Blocks.graphiticStone :
|
||||
rand.chance(carbonChance) ? Blocks.carbonStone :
|
||||
rand.chance(berylChance) ? Blocks.beryllicStone :
|
||||
Blocks.ferricStone
|
||||
).asFloor();
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
|||
}
|
||||
|
||||
if(Ridged.noise3d(2, position.x, position.y + 4f, position.z, 3, 7f) > 0.7){
|
||||
tile.floor = Blocks.graphiticStone;
|
||||
tile.floor = Blocks.carbonStone;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ kapt.include.compile.classpath=false
|
|||
kotlin.stdlib.default.dependency=false
|
||||
#needed for android compilation
|
||||
android.useAndroidX=true
|
||||
archash=b9d3067269d34c8f0cf3657c6b3919e327727f7e
|
||||
archash=52f21644b8f70c3a926d3d8d8130f0d71e0e4e79
|
||||
|
|
|
|||