Many various campaign mechanic changes

This commit is contained in:
Anuken
2020-07-07 21:13:03 -04:00
parent b95206cf87
commit 26e70fa585
11 changed files with 220 additions and 31 deletions

View File

@@ -122,7 +122,11 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
//draw all sector stuff
for(Sector sec : planet.sectors){
if(selectAlpha > 0.01f){
if(canLaunch(sec) || sec.unlocked()){
if(/*canLaunch(sec) || sec.unlocked()*/true){
if(sec.baseCoverage > 0){
planets.fill(sec, Tmp.c1.set(Team.crux.color).a(0.1f * sec.baseCoverage * selectAlpha), -0.002f);
}
Color color =
sec.hasBase() ? Team.sharded.color :
sec.preset != null ? Team.derelict.color :
@@ -220,6 +224,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
@Override
public void draw(){
planets.render(PlanetDialog.this);
Core.scene.setScrollFocus(PlanetDialog.this);
}
},
new Table(t -> {
@@ -277,7 +282,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
selectAlpha = Mathf.lerpDelta(selectAlpha, Mathf.num(planets.zoom < 1.9f), 0.1f);
}
//TODO add strings to bundle after prototyping is done
//TODO localize
private void updateSelected(){
Sector sector = selected;
@@ -294,6 +299,13 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
stable.image().color(Pal.accent).fillX().height(3f).pad(3f).row();
stable.add(sector.save != null ? sector.save.getPlayTime() : "[lightgray]Unexplored").row();
if(sector.hasBase() && sector.hasWaves()){
stable.add("[scarlet]Under attack!");
stable.row();
stable.add("[accent]" + Mathf.ceil(sectorDestructionTurns - (sector.getSecondsPassed() * 60) / turnDuration) + " turn(s) until destruction");
stable.row();
}
stable.add("Resources:").row();
stable.table(t -> {
t.left();