Hot rock + basalt generation for sectors
This commit is contained in:
@@ -29,9 +29,9 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
||||
{Blocks.water, Blocks.sandWater, Blocks.sand, Blocks.salt, Blocks.salt, Blocks.salt, Blocks.sand, Blocks.stone, Blocks.stone, Blocks.stone, Blocks.snow, Blocks.iceSnow, Blocks.ice},
|
||||
{Blocks.deepwater, Blocks.water, Blocks.sandWater, Blocks.sand, Blocks.salt, Blocks.sand, Blocks.sand, Blocks.basalt, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.ice},
|
||||
{Blocks.deepwater, Blocks.water, Blocks.sandWater, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.moss, Blocks.iceSnow, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.snow, Blocks.ice},
|
||||
{Blocks.deepwater, Blocks.sandWater, Blocks.sand, Blocks.sand, Blocks.moss, Blocks.moss, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.ice, Blocks.snow, Blocks.ice},
|
||||
{Blocks.taintedWater, Blocks.darksandTaintedWater, Blocks.darksand, Blocks.darksand, Blocks.basalt, Blocks.moss, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.snow, Blocks.ice, Blocks.ice},
|
||||
{Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.moss, Blocks.sporeMoss, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.ice},
|
||||
{Blocks.deepwater, Blocks.sandWater, Blocks.sand, Blocks.sand, Blocks.moss, Blocks.moss, Blocks.snow, Blocks.basalt, Blocks.basalt, Blocks.basalt, Blocks.ice, Blocks.snow, Blocks.ice},
|
||||
{Blocks.taintedWater, Blocks.darksandTaintedWater, Blocks.darksand, Blocks.darksand, Blocks.basalt, Blocks.moss, Blocks.basalt, Blocks.hotrock, Blocks.basalt, Blocks.ice, Blocks.snow, Blocks.ice, Blocks.ice},
|
||||
{Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.moss, Blocks.sporeMoss, Blocks.snow, Blocks.basalt, Blocks.basalt, Blocks.ice, Blocks.snow, Blocks.ice, Blocks.ice},
|
||||
{Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.sporeMoss, Blocks.ice, Blocks.ice, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.ice, Blocks.ice},
|
||||
{Blocks.taintedWater, Blocks.darksandTaintedWater, Blocks.darksand, Blocks.sporeMoss, Blocks.sporeMoss, Blocks.ice, Blocks.ice, Blocks.snow, Blocks.snow, Blocks.ice, Blocks.ice, Blocks.ice, Blocks.ice},
|
||||
{Blocks.darksandTaintedWater, Blocks.darksandTaintedWater, Blocks.darksand, Blocks.sporeMoss, Blocks.moss, Blocks.sporeMoss, Blocks.iceSnow, Blocks.snow, Blocks.ice, Blocks.ice, Blocks.ice, Blocks.ice, Blocks.ice},
|
||||
@@ -265,17 +265,36 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
||||
floor = Blocks.moss;
|
||||
}
|
||||
|
||||
//random stuff
|
||||
|
||||
for(int i = 0; i < 4; i++){
|
||||
Tile near = world.tile(x + Geometry.d4[i].x, y + Geometry.d4[i].y);
|
||||
if(near != null && near.block() != Blocks.air){
|
||||
return;
|
||||
if(floor == Blocks.hotrock){
|
||||
if(rand.chance(0.3)){
|
||||
floor = Blocks.basalt;
|
||||
}else{
|
||||
ore = Blocks.air;
|
||||
boolean all = true;
|
||||
for(Point2 p : Geometry.d4){
|
||||
Tile other = tiles.get(x + p.x, y + p.y);
|
||||
if(other == null || (other.floor() != Blocks.hotrock && other.floor() != Blocks.magmarock)){
|
||||
all = false;
|
||||
}
|
||||
}
|
||||
if(all){
|
||||
floor = Blocks.magmarock;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(rand.chance(0.01) && !floor.asFloor().isLiquid && block == Blocks.air){
|
||||
block = dec.get(floor, floor.asFloor().decoration);
|
||||
//random stuff
|
||||
dec: {
|
||||
for(int i = 0; i < 4; i++){
|
||||
Tile near = world.tile(x + Geometry.d4[i].x, y + Geometry.d4[i].y);
|
||||
if(near != null && near.block() != Blocks.air){
|
||||
break dec;
|
||||
}
|
||||
}
|
||||
|
||||
if(rand.chance(0.01) && !floor.asFloor().isLiquid && block == Blocks.air){
|
||||
block = dec.get(floor, floor.asFloor().decoration);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -29,6 +29,9 @@ import static mindustry.graphics.g3d.PlanetRenderer.*;
|
||||
import static mindustry.ui.dialogs.PlanetDialog.Mode.*;
|
||||
|
||||
public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
//if true, enables launching anywhere for testing
|
||||
public static boolean debugSelect = false;
|
||||
|
||||
final FrameBuffer buffer = new FrameBuffer(2, 2, true);
|
||||
final PlanetRenderer planets = renderer.planets;
|
||||
final LaunchLoadoutDialog loadouts = new LaunchLoadoutDialog();
|
||||
@@ -149,27 +152,30 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
public void renderSectors(Planet planet){
|
||||
|
||||
//draw all sector stuff
|
||||
for(Sector sec : planet.sectors){
|
||||
if(!debugSelect){
|
||||
for(Sector sec : planet.sectors){
|
||||
|
||||
if(selectAlpha > 0.01f){
|
||||
if(canSelect(sec) || sec.unlocked()){
|
||||
if(sec.baseCoverage > 0){
|
||||
planets.fill(sec, Tmp.c1.set(Team.crux.color).a(0.5f * sec.baseCoverage * selectAlpha), -0.002f);
|
||||
if(selectAlpha > 0.01f){
|
||||
if(canSelect(sec) || sec.unlocked()){
|
||||
if(sec.baseCoverage > 0){
|
||||
planets.fill(sec, Tmp.c1.set(Team.crux.color).a(0.5f * sec.baseCoverage * selectAlpha), -0.002f);
|
||||
}
|
||||
|
||||
Color color =
|
||||
sec.hasBase() ? Team.sharded.color :
|
||||
sec.preset != null ? Team.derelict.color :
|
||||
sec.hasEnemyBase() ? Team.crux.color :
|
||||
null;
|
||||
|
||||
if(color != null){
|
||||
planets.drawSelection(sec, Tmp.c1.set(color).mul(0.8f).a(selectAlpha), 0.026f, -0.001f);
|
||||
}
|
||||
}else{
|
||||
planets.fill(sec, Tmp.c1.set(shadowColor).mul(1, 1, 1, selectAlpha), -0.001f);
|
||||
}
|
||||
|
||||
Color color =
|
||||
sec.hasBase() ? Team.sharded.color :
|
||||
sec.preset != null ? Team.derelict.color :
|
||||
sec.hasEnemyBase() ? Team.crux.color :
|
||||
null;
|
||||
|
||||
if(color != null){
|
||||
planets.drawSelection(sec, Tmp.c1.set(color).mul(0.8f).a(selectAlpha), 0.026f, -0.001f);
|
||||
}
|
||||
}else{
|
||||
planets.fill(sec, Tmp.c1.set(shadowColor).mul(1, 1, 1, selectAlpha), -0.001f);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(launchSector != null){
|
||||
@@ -240,7 +246,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
addListener(new ElementGestureListener(){
|
||||
@Override
|
||||
public void tap(InputEvent event, float x, float y, int count, KeyCode button){
|
||||
if(hovered != null && (mode == launch ? canSelect(hovered) && hovered != launchSector : hovered.unlocked())){
|
||||
if(hovered != null && ((mode == launch ? canSelect(hovered) && hovered != launchSector : hovered.unlocked()) || debugSelect)){
|
||||
selected = hovered;
|
||||
}
|
||||
|
||||
@@ -403,7 +409,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
|
||||
stable.row();
|
||||
|
||||
if((sector.hasBase() && mode == look) || canSelect(sector) || (sector.preset != null && sector.preset.alwaysUnlocked)){
|
||||
if((sector.hasBase() && mode == look) || canSelect(sector) || (sector.preset != null && sector.preset.alwaysUnlocked) || debugSelect){
|
||||
stable.button(mode == select ? "@sectors.select" : sector.hasBase() ? "@sectors.resume" : "@sectors.launch", Styles.transt, () -> {
|
||||
|
||||
boolean shouldHide = true;
|
||||
|
||||
Reference in New Issue
Block a user