This commit is contained in:
Anuken 2020-09-12 14:57:00 -04:00
parent 640a45ea66
commit b58b6c7361
4 changed files with 5 additions and 3 deletions

View File

@ -187,7 +187,7 @@ public class Logic implements ApplicationListener{
//campaign maps do not have a 'win' state!
if(state.isCampaign()){
//gameover only when cores are dead
if(!state.rules.attackMode && state.teams.playerCores().size == 0 && !state.gameOver){
if(state.teams.playerCores().size == 0 && !state.gameOver){
state.gameOver = true;
Events.fire(new GameOverEvent(state.rules.waveTeam));
}

View File

@ -354,7 +354,7 @@ public class DesktopInput extends InputHandler{
table.button(Icon.up, Styles.clearPartiali, () -> {
ui.planet.show(state.getSector(), player.team().core());
}).visible(() -> state.isCampaign()).tooltip("@launchcore");
}).visible(() -> state.isCampaign()).tooltip("@launchcore").disabled(b -> player.team().core() == null);
}
void pollInput(){

View File

@ -88,7 +88,7 @@ public class PausedDialog extends BaseDialog{
cont.buttonRow("@launchcore", Icon.up, () -> {
hide();
ui.planet.show(state.getSector(), player.team().core());
});
}).disabled(b -> player.team().core() == null);
cont.row();

View File

@ -94,6 +94,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
}
public void show(Sector sector, CoreBuild launcher){
if(launcher == null) return;
this.launcher = launcher;
selected = null;
hovered = null;