From 7b00d4bb1b6cd250b66f1f36f04e199075c7cf34 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 31 May 2025 11:43:25 -0400 Subject: [PATCH] Fixed Serpulo discontinuity --- core/src/mindustry/game/Saves.java | 2 ++ .../maps/planet/SerpuloPlanetGenerator.java | 12 +++++------- core/src/mindustry/ui/dialogs/PlanetDialog.java | 1 - 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/core/src/mindustry/game/Saves.java b/core/src/mindustry/game/Saves.java index f01be9db6f..1d39087efd 100644 --- a/core/src/mindustry/game/Saves.java +++ b/core/src/mindustry/game/Saves.java @@ -97,6 +97,8 @@ public class Saves{ } } + //TODO: sectors like Ruinous Shores get overwritten first and explode when getting remapped + 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(!slot.file.equals(getSectorFile(remapTarget))){ diff --git a/core/src/mindustry/maps/planet/SerpuloPlanetGenerator.java b/core/src/mindustry/maps/planet/SerpuloPlanetGenerator.java index 247553a6bf..d78a58492a 100644 --- a/core/src/mindustry/maps/planet/SerpuloPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/SerpuloPlanetGenerator.java @@ -26,8 +26,10 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{ public static boolean genLakes = false; BaseGenerator basegen = new BaseGenerator(); + float heightYOffset = 42.5f; float scl = 5f; - float waterOffset = 0.05f; + float waterOffset = 0.04f; + float heightScl = 1.01f; Block[][] arr = { @@ -62,7 +64,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{ Vec3 basePos = new Vec3(0.9341721, 0.0, 0.3568221); 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 @@ -108,10 +110,6 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{ @Override 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); //replace salt with sand color if(block == Blocks.salt) block = Blocks.sand; @@ -177,7 +175,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{ float rad = scl; 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); height *= 1.2f; height = Mathf.clamp(height); diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index e1bfee6fd7..83f52873c8 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -33,7 +33,6 @@ import mindustry.graphics.g3d.*; import mindustry.input.*; import mindustry.io.*; import mindustry.maps.*; -import mindustry.maps.planet.*; import mindustry.type.*; import mindustry.type.Planet.*; import mindustry.ui.*;