From ad425f322ce3d92a726f6af6c35f2b9c857f621a Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 16 Sep 2021 10:33:15 -0400 Subject: [PATCH] Proper asteroid albedo --- core/src/mindustry/content/Blocks.java | 1 + core/src/mindustry/content/Planets.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 47ce2eeaaf..06155deab7 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -408,6 +408,7 @@ public class Blocks implements ContentList{ iceWall = new StaticWall("ice-wall"){{ iceSnow.asFloor().wall = this; + albedo = 0.6f; }}; snowWall = new StaticWall("snow-wall"); diff --git a/core/src/mindustry/content/Planets.java b/core/src/mindustry/content/Planets.java index 843adc9ac9..1a7ae2b1ec 100644 --- a/core/src/mindustry/content/Planets.java +++ b/core/src/mindustry/content/Planets.java @@ -78,6 +78,7 @@ public class Planets implements ContentList{ startSector = 10; atmosphereRadIn = -0.01f; atmosphereRadOut = 0.3f; + alwaysUnlocked = true; }}; serpulo = new Planet("serpulo", sun, 1, 3){{ @@ -118,19 +119,20 @@ public class Planets implements ContentList{ cgen.get((AsteroidGenerator)generator); meshLoader = () -> { + Color tinted = tint.mapColor.cpy().a(1f - tint.mapColor.a); Seq meshes = new Seq<>(); Color color = base.mapColor; Rand rand = new Rand(id + 2); meshes.add(new NoiseMesh( this, 0, 2, radius, 2, 0.55f, 0.45f, 14f, - color, tint.mapColor, 3, 0.6f, 0.38f, tintThresh + color, tinted, 3, 0.6f, 0.38f, tintThresh )); for(int j = 0; j < pieces; j++){ meshes.add(new MatMesh( new NoiseMesh(this, j + 1, 1, 0.022f + rand.random(0.039f) * scale, 2, 0.6f, 0.38f, 20f, - color, tint.mapColor, 3, 0.6f, 0.38f, tintThresh), + color, tinted, 3, 0.6f, 0.38f, tintThresh), new Mat3D().setToTranslation(Tmp.v31.setToRandomDirection(rand).setLength(rand.random(0.44f, 1.4f) * scale))) ); }