Bugfixes / Default capture waves

This commit is contained in:
Anuken
2020-07-31 10:40:27 -04:00
parent 658079fab6
commit 2510b09201
7 changed files with 32 additions and 15 deletions

View File

@@ -36,7 +36,8 @@ public class PausedDialog extends BaseDialog{
if(!mobile){
//TODO localize
cont.label(() -> state.getSector() == null ? "" :
"[lightgray]Next turn in [accent]" + state.getSector().displayTimeRemaining())
("[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();

View File

@@ -120,8 +120,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
boolean canLaunch(Sector sector){
return mode == launch &&
(sector.tile.v.within(launchSector.tile.v, (launchRange + 0.5f) * planets.planet.sectorApproxRadius*2) //within range
//TODO completely untested
|| (sector.preset != null && sector.preset.unlocked() && TechTree.get(sector.preset) != null && TechTree.get(sector.preset).objectives.contains(r -> r.zone() != null && r.zone() == sector.preset))); //is an unlocked preset
|| (sector.preset != null && sector.preset.unlocked() && TechTree.get(sector.preset) != null && TechTree.get(sector.preset).objectives.contains(r -> r.zone() != null && r.zone() == launchSector.preset))); //is an unlocked preset
}
@Override