Fixed Serpulo discontinuity
This commit is contained in:
@@ -97,6 +97,8 @@ public class Saves{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: sectors like Ruinous Shores get overwritten first and explode when getting remapped
|
||||||
|
|
||||||
if(remapTarget != null){
|
if(remapTarget != null){
|
||||||
//if the file name matches the destination of the remap, assume it has already been remapped, and skip the file movement procedure
|
//if the file name matches the destination of the remap, assume it has already been remapped, and skip the file movement procedure
|
||||||
if(!slot.file.equals(getSectorFile(remapTarget))){
|
if(!slot.file.equals(getSectorFile(remapTarget))){
|
||||||
|
|||||||
@@ -26,8 +26,10 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
|||||||
public static boolean genLakes = false;
|
public static boolean genLakes = false;
|
||||||
|
|
||||||
BaseGenerator basegen = new BaseGenerator();
|
BaseGenerator basegen = new BaseGenerator();
|
||||||
|
float heightYOffset = 42.5f;
|
||||||
float scl = 5f;
|
float scl = 5f;
|
||||||
float waterOffset = 0.05f;
|
float waterOffset = 0.04f;
|
||||||
|
float heightScl = 1.01f;
|
||||||
|
|
||||||
Block[][] arr =
|
Block[][] arr =
|
||||||
{
|
{
|
||||||
@@ -62,7 +64,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
|||||||
Vec3 basePos = new Vec3(0.9341721, 0.0, 0.3568221);
|
Vec3 basePos = new Vec3(0.9341721, 0.0, 0.3568221);
|
||||||
|
|
||||||
float rawHeight(Vec3 position){
|
float rawHeight(Vec3 position){
|
||||||
return (Mathf.pow(Simplex.noise3d(seed, 7, 0.5f, 1f/3f, position.x * scl, position.y * scl, position.z * scl), 2.3f) + waterOffset) / (1f + waterOffset);
|
return (Mathf.pow(Simplex.noise3d(seed, 7, 0.5f, 1f/3f, position.x * scl, position.y * scl + heightYOffset, position.z * scl) * heightScl, 2.3f) + waterOffset) / (1f + waterOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -108,10 +110,6 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getColor(Vec3 position, Color out){
|
public void getColor(Vec3 position, Color out){
|
||||||
//if(dst*metalDstScl + Simplex.noise3d(seed, 3, 0.4, 4f, position.x, position.y + 200f, position.z)*0.14f < 0.09f){
|
|
||||||
// return Tmp.c1.set(Team.crux.color).lerp(Team.sharded.color, 0.4f*Simplex.noise3d(seed, 1, 1, 9f, position.x, position.y + 999f, position.z)).a(packAlpha(0f, 1f));
|
|
||||||
//}
|
|
||||||
|
|
||||||
Block block = getBlock(position);
|
Block block = getBlock(position);
|
||||||
//replace salt with sand color
|
//replace salt with sand color
|
||||||
if(block == Blocks.salt) block = Blocks.sand;
|
if(block == Blocks.salt) block = Blocks.sand;
|
||||||
@@ -177,7 +175,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
|||||||
|
|
||||||
float rad = scl;
|
float rad = scl;
|
||||||
float temp = Mathf.clamp(Math.abs(py * 2f) / (rad));
|
float temp = Mathf.clamp(Math.abs(py * 2f) / (rad));
|
||||||
float tnoise = Simplex.noise3d(seed, 7, 0.56, 1f/3f, px, py + 999f, pz);
|
float tnoise = Simplex.noise3d(seed, 7, 0.56, 1f/3f, px, py + 999f - 0.1f, pz);
|
||||||
temp = Mathf.lerp(temp, tnoise, 0.5f);
|
temp = Mathf.lerp(temp, tnoise, 0.5f);
|
||||||
height *= 1.2f;
|
height *= 1.2f;
|
||||||
height = Mathf.clamp(height);
|
height = Mathf.clamp(height);
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ import mindustry.graphics.g3d.*;
|
|||||||
import mindustry.input.*;
|
import mindustry.input.*;
|
||||||
import mindustry.io.*;
|
import mindustry.io.*;
|
||||||
import mindustry.maps.*;
|
import mindustry.maps.*;
|
||||||
import mindustry.maps.planet.*;
|
|
||||||
import mindustry.type.*;
|
import mindustry.type.*;
|
||||||
import mindustry.type.Planet.*;
|
import mindustry.type.Planet.*;
|
||||||
import mindustry.ui.*;
|
import mindustry.ui.*;
|
||||||
|
|||||||
Reference in New Issue
Block a user