Skip to content

Commit

Permalink
planet "finsished"
Browse files Browse the repository at this point in the history
  • Loading branch information
Twcash committed Sep 23, 2024
1 parent d2de95e commit af962de
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/aquarion/blocks/AquaEnv.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class AquaEnv {
public static Block algalBoulder, feldsparBoulder, gabbroBoulder, kelp, rockweed, urchin;

// Floors
public static Block andesiteLayers, basaltSpikes ,algal_carpet, brine_liquid, shallowBrine, coral_floor, feldspar_vent, feldspar, ferric_extrusions, gabbro_extrusions, gabbro_vent, gabbro, geothermal_vent, kelp_floor, roughFeldspar, phylite_floor, slate, shaleVent, andesite, andesiteRubble, andesiteVent;
public static Block andesiteLayers, basaltSpikes ,algal_carpet, brine_liquid, coral_floor, feldspar_vent, feldspar, ferric_extrusions, gabbro_extrusions, gabbro_vent, gabbro, geothermal_vent, kelp_floor, roughFeldspar, phylite_floor, slate, shaleVent, andesite, andesiteRubble, andesiteVent;

// Ore blocks
public static Block leadNodules, oreBauxite, oreGallium, oreLithium, oreManganese;
Expand Down
11 changes: 8 additions & 3 deletions src/aquarion/planets/AquaPlanetGenarator.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@
import arc.util.noise.*;
import mindustry.content.*;
import mindustry.game.*;
import mindustry.graphics.g3d.PlanetGrid;
import mindustry.maps.generators.*;
import mindustry.type.*;
import mindustry.world.*;

import static mindustry.Vars.*;

public class AquaPlanetGenarator extends PlanetGenerator{
Color c1 = Color.valueOf("5057a6"), c2 = Color.valueOf("272766"), out = new Color();

Color c1 = Color.valueOf("5057a6"), c2 = Color.valueOf("272766"), out = new Color();
Color c3 = Color.valueOf("727be2"), c4 = Color.valueOf("#90aae4");
Color c5 = Color.valueOf("dde8ff"), c6 = Color.valueOf("#e5edff");
Block[][] arr = {
{Blocks.shale, AquaEnv.phylite_floor, AquaEnv.slate, Blocks.basalt, AquaEnv.basaltSpikes, AquaEnv.ferric_extrusions, Blocks.ferricStone, Blocks.dacite, AquaEnv.andesite, AquaEnv.andesiteRubble, AquaEnv.andesiteLayers}
};
Expand All @@ -32,12 +35,14 @@ public void generateSector(Sector sector){

@Override
public float getHeight(Vec3 position){
return 0;
float poles = Math.abs(position.y);
float depth = Simplex.noise3d(seed, 2, 0.56, 1.7f, position.x, position.y, position.z) / 2f;
if (depth + poles> 1.1f) {return Mathf.pow(rawHeight(position), 0.25f) /3.5f;} else return 0;
}

@Override
public Color getColor(Vec3 position){
float depth = Simplex.noise3d(seed, 2, 0.56, 1.7f, position.x, position.y, position.z) / 2f;
if (Math.abs(position.y) + depth> 0.98) {return c5.write(out).lerp(c6, Mathf.clamp(Mathf.round(depth, 0.25f))).a(0.6f);} else if (Math.abs(position.y) + depth> 0.8) {return c3.write(out).lerp(c4, Mathf.clamp(Mathf.round(depth, 0.25f))).a(0.5f);}
return c1.write(out).lerp(c2, Mathf.clamp(Mathf.round(depth, 0.15f))).a(0.2f);
}

Expand Down
9 changes: 5 additions & 4 deletions src/aquarion/planets/AquaPlanets.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ public static void loadContent() {
atmosphereColor = Color.valueOf("3db899");
iconColor = Color.valueOf("597be3");
cloudMeshLoader = () -> new MultiMesh(
new HexSkyMesh(this, 3, 0.13f, 0.16f, 5, Color.valueOf("c4ebed").a(0.75f), 2, 0.18f, 1.2f, 0.38f),
new HexSkyMesh(this, 5, 0.14f, 0.17f, 5, Color.valueOf("edfeff").a(0.65f), 2, 0.12f, 1.5f, 0.32f)
new HexSkyMesh(this, 3, 0.13f, 0.11f, 5, Color.valueOf("c4ebed").a(0.75f), 2, 0.18f, 1.2f, 0.3f),
new HexSkyMesh(this, 5, 0.7f, 0.09f, 5, Color.valueOf("edfeff").a(0.65f), 3, 0.12f, 1.5f, 0.32f),
new HexSkyMesh(this, 8, 0.3f, 0.08f, 5, Color.valueOf("d3cad7").a(0.55f), 2, 0.08f, 1.6f, 0.35f)
);
startSector = 10;
atmosphereRadIn = -0.01f;
atmosphereRadOut = 0.3f;
atmosphereRadIn = -0.03f;
atmosphereRadOut = 0.6f;
itemWhitelist.addAll(AquaItems.bauxite, AquaItems.sodium, AquaItems.manganese, Items.lead, Items.metaglass, AquaItems.lithium, AquaItems.nitride, AquaItems.duralumin, AquaItems.lithoniteAlloy);
defaultEnv|= Env.terrestrial | Env.underwater;
ruleSetter = r -> {
Expand Down

0 comments on commit af962de

Please sign in to comment.