Named the starter planet

This commit is contained in:
Anuken
2020-07-30 16:14:15 -04:00
parent 99fafc47f2
commit f39609d1ef
6 changed files with 19 additions and 21 deletions

View File

@@ -9,7 +9,7 @@ import mindustry.type.*;
public class Planets implements ContentList{
public static Planet
sun,
starter; //TODO rename
serpulo;
@Override
public void load(){
@@ -31,9 +31,8 @@ public class Planets implements ContentList{
);
}};
//TODO rename
starter = new Planet("TODO", sun, 3, 1){{
generator = new TODOPlanetGenerator();
serpulo = new Planet("serpulo", sun, 3, 1){{
generator = new SerpuloPlanetGenerator();
meshLoader = () -> new HexMesh(this, 6);
atmosphereColor = Color.valueOf("3c1b8f");
startSector = 15;

View File

@@ -17,7 +17,7 @@ public class SectorPresets implements ContentList{
@Override
public void load(){
groundZero = new SectorPreset("groundZero", starter, 15){{
groundZero = new SectorPreset("groundZero", serpulo, 15){{
alwaysUnlocked = true;
conditionWave = 5;
launchPeriod = 5;
@@ -26,7 +26,7 @@ public class SectorPresets implements ContentList{
};
}};
saltFlats = new SectorPreset("saltFlats", starter, 101){{
saltFlats = new SectorPreset("saltFlats", serpulo, 101){{
conditionWave = 10;
launchPeriod = 5;
requirements = with(
@@ -38,7 +38,7 @@ public class SectorPresets implements ContentList{
);
}};
frozenForest = new SectorPreset("frozenForest", starter, 86){{
frozenForest = new SectorPreset("frozenForest", serpulo, 86){{
conditionWave = 10;
requirements = with(
new SectorWave(groundZero, 10),
@@ -47,7 +47,7 @@ public class SectorPresets implements ContentList{
);
}};
craters = new SectorPreset("craters", starter, 18){{
craters = new SectorPreset("craters", serpulo, 18){{
conditionWave = 10;
requirements = with(
new SectorWave(frozenForest, 10),
@@ -56,7 +56,7 @@ public class SectorPresets implements ContentList{
);
}};
ruinousShores = new SectorPreset("ruinousShores", starter, 19){{
ruinousShores = new SectorPreset("ruinousShores", serpulo, 19){{
conditionWave = 20;
launchPeriod = 20;
requirements = with(
@@ -69,7 +69,7 @@ public class SectorPresets implements ContentList{
);
}};
stainedMountains = new SectorPreset("stainedMountains", starter, 20){{
stainedMountains = new SectorPreset("stainedMountains", serpulo, 20){{
conditionWave = 10;
launchPeriod = 10;
requirements = with(
@@ -80,7 +80,7 @@ public class SectorPresets implements ContentList{
);
}};
fungalPass = new SectorPreset("fungalPass", starter, 21){{
fungalPass = new SectorPreset("fungalPass", serpulo, 21){{
requirements = with(
new SectorWave(stainedMountains, 15),
//new Unlock(Blocks.daggerFactory),
@@ -90,7 +90,7 @@ public class SectorPresets implements ContentList{
);
}};
overgrowth = new SectorPreset("overgrowth", starter, 22){{
overgrowth = new SectorPreset("overgrowth", serpulo, 22){{
conditionWave = 12;
launchPeriod = 4;
requirements = with(
@@ -103,7 +103,7 @@ public class SectorPresets implements ContentList{
);
}};
tarFields = new SectorPreset("tarFields", starter, 23){{
tarFields = new SectorPreset("tarFields", serpulo, 23){{
conditionWave = 15;
launchPeriod = 10;
requirements = with(
@@ -114,7 +114,7 @@ public class SectorPresets implements ContentList{
);
}};
desolateRift = new SectorPreset("desolateRift", starter, 123){{
desolateRift = new SectorPreset("desolateRift", serpulo, 123){{
conditionWave = 3;
launchPeriod = 2;
requirements = with(
@@ -125,7 +125,7 @@ public class SectorPresets implements ContentList{
}};
nuclearComplex = new SectorPreset("nuclearComplex", starter, 130){{
nuclearComplex = new SectorPreset("nuclearComplex", serpulo, 130){{
conditionWave = 30;
launchPeriod = 15;
requirements = with(

View File

@@ -76,7 +76,7 @@ abstract class BuilderComp implements Unitc{
Tile tile = world.tile(current.x, current.y);
if(!within(tile, finalPlaceDst)){
if(within(tile, finalPlaceDst)){
rotation = Mathf.slerpDelta(rotation, angleTo(tile), 0.4f);
}

View File

@@ -33,7 +33,7 @@ public class PlanetRenderer implements Disposable{
/** The sun/main planet of the solar system from which everything is rendered. */
public final Planet solarSystem = Planets.sun;
/** Planet being looked at. */
public Planet planet = Planets.starter;
public Planet planet = Planets.serpulo;
/** Camera used for rendering. */
public Camera3D cam = new Camera3D();
/** Raw vertex batch. */

View File

@@ -14,7 +14,7 @@ import mindustry.world.*;
import static mindustry.Vars.*;
public class TODOPlanetGenerator extends PlanetGenerator{
public class SerpuloPlanetGenerator extends PlanetGenerator{
Simplex noise = new Simplex();
RidgedPerlin rid = new RidgedPerlin(1, 2);
BaseGenerator basegen = new BaseGenerator();
@@ -92,7 +92,7 @@ public class TODOPlanetGenerator extends PlanetGenerator{
position = Tmp.v33.set(position).scl(scl);
float rad = scl;
float temp = Mathf.clamp(Math.abs(position.y * 2f) / (rad));
float tnoise = (float)noise.octaveNoise3D(7, 0.5f, 1f/3f, position.x, position.y + 999f, position.z);
float tnoise = (float)noise.octaveNoise3D(7, 0.56, 1f/3f, position.x, position.y + 999f, position.z);
temp = Mathf.lerp(temp, tnoise, 0.5f);
height *= 1.2f;
height = Mathf.clamp(height);
@@ -242,7 +242,7 @@ public class TODOPlanetGenerator extends PlanetGenerator{
for(int i = ores.size - 1; i >= 0; i--){
Block entry = ores.get(i);
float freq = frequencies.get(i);
if(Math.abs(0.5f - noise(offsetX, offsetY + i*999, 2, 0.7, (40 + i * 2))) > 0.25f &&
if(Math.abs(0.5f - noise(offsetX, offsetY + i*999, 2, 0.7, (40 + i * 2))) > 0.22f + i*0.01 &&
Math.abs(0.5f - noise(offsetX, offsetY - i*999, 1, 1, (30 + i * 4))) > 0.37f + freq){
ore = entry;
break;

View File

@@ -174,7 +174,6 @@ public class LaunchPad extends Block{
@Override
public void remove(){
//actually launch the items upon removal
if(team() == state.rules.defaultTeam && state.secinfo.origin != null){
ItemSeq dest = state.secinfo.origin.getExtraItems();