Sector simplification
This commit is contained in:
@@ -35,10 +35,11 @@ public class PausedDialog extends BaseDialog{
|
||||
|
||||
if(!mobile){
|
||||
//TODO localize
|
||||
cont.label(() -> state.getSector() == null ? "" :
|
||||
("[lightgray]Next turn in [accent]" + state.getSector().displayTimeRemaining() +
|
||||
(state.rules.winWave > 0 && !state.getSector().isCaptured() ? "\n[lightgray]Reach wave[accent] " + state.rules.winWave + "[] to capture" : "")))
|
||||
.visible(() -> state.getSector() != null).colspan(2);
|
||||
//TODO capturing is disabled, remove?
|
||||
//cont.label(() -> state.getSector() == null ? "" :
|
||||
//("[lightgray]Next turn in [accent]" + state.getSector().displayTimeRemaining() +
|
||||
// (state.rules.winWave > 0 && !state.getSector().isCaptured() ? "\n[lightgray]Reach wave[accent] " + state.rules.winWave + "[] to capture" : "")))
|
||||
// .visible(() -> state.getSector() != null).colspan(2);
|
||||
cont.row();
|
||||
|
||||
float dw = 220f;
|
||||
|
||||
@@ -263,9 +263,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
}
|
||||
},
|
||||
new Table(t -> {
|
||||
t.touchable = Touchable.disabled;
|
||||
//TODO localize
|
||||
t.top();
|
||||
t.label(() -> mode == select ? "@sectors.select" : mode == launch ? "Select Launch Sector" : "Turn " + universe.turn()).style(Styles.outlineLabel).color(Pal.accent);
|
||||
t.label(() -> mode == select ? "@sectors.select" : mode == launch ? "Select Launch Sector" : "").style(Styles.outlineLabel).color(Pal.accent);
|
||||
})).grow();
|
||||
|
||||
}
|
||||
@@ -338,6 +339,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
stable.add("[accent]Difficulty: " + (int)(sector.baseCoverage * 10)).row();
|
||||
}
|
||||
|
||||
//TODO sector damage is disabled, remove when finalized
|
||||
/*
|
||||
if(sector.hasBase() && sector.hasWaves()){
|
||||
//TODO localize when finalized
|
||||
//these mechanics are likely to change and as such are not added to the bundle
|
||||
@@ -345,7 +348,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
stable.row();
|
||||
stable.add("[accent]" + Mathf.ceil(sectorDestructionTurns - (sector.getSecondsPassed() * 60) / turnDuration) + " turn(s)\nuntil destruction");
|
||||
stable.row();
|
||||
}
|
||||
}*/
|
||||
|
||||
if(sector.save != null){
|
||||
stable.add("@sectors.resources").row();
|
||||
|
||||
@@ -15,6 +15,7 @@ import arc.scene.ui.layout.*;
|
||||
import arc.struct.*;
|
||||
import arc.util.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.core.GameState.*;
|
||||
import mindustry.ctype.*;
|
||||
import mindustry.game.EventType.*;
|
||||
@@ -47,6 +48,26 @@ public class HudFragment extends Fragment{
|
||||
@Override
|
||||
public void build(Group parent){
|
||||
|
||||
//warn about guardian/boss waves
|
||||
Events.on(WaveEvent.class, e -> {
|
||||
int max = 10;
|
||||
outer:
|
||||
for(int i = state.wave - 1; i <= state.wave + max; i++){
|
||||
for(SpawnGroup group : state.rules.spawns){
|
||||
if(group.effect == StatusEffects.boss && group.getUnitsSpawned(i) > 0){
|
||||
int diff = (i + 2) - state.wave;
|
||||
|
||||
//increments at which to warn about incoming guardian
|
||||
if(diff == 1 || diff == 2 || diff == 5 || diff == 10){
|
||||
showToast(Icon.warning, Core.bundle.format("wave.guardianwarn" + (diff == 1 ? ".one" : ""), diff));
|
||||
}
|
||||
|
||||
break outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//TODO details and stuff
|
||||
Events.on(SectorCaptureEvent.class, e ->{
|
||||
//TODO localize
|
||||
|
||||
Reference in New Issue
Block a user