Removed outOfTime pause

This commit is contained in:
Anuken 2020-09-30 22:25:28 -04:00
parent f3c642d0d7
commit 54c991e611
4 changed files with 3 additions and 20 deletions

View File

@ -519,7 +519,7 @@ public class Control implements ApplicationListener, Loadable{
platform.updateRPC();
}
if(Core.input.keyTap(Binding.pause) && !state.isOutOfTime() && !scene.hasDialog() && !scene.hasKeyboard() && !ui.restart.isShown() && (state.is(State.paused) || state.is(State.playing))){
if(Core.input.keyTap(Binding.pause) && !scene.hasDialog() && !scene.hasKeyboard() && !ui.restart.isShown() && (state.is(State.paused) || state.is(State.playing))){
state.set(state.is(State.playing) ? State.paused : State.playing);
}

View File

@ -50,11 +50,6 @@ public class GameState{
return rules.sector != null;
}
/** @return whether the player is in a campaign and they are out of sector time */
public boolean isOutOfTime(){
return isCampaign() && isGame() && getSector().getTimeSpent() >= turnDuration && !net.active();
}
public boolean hasSector(){
return rules.sector != null;
}

View File

@ -282,18 +282,6 @@ public class Logic implements ApplicationListener{
state.enemies = Groups.unit.count(u -> u.team() == state.rules.waveTeam && u.type().isCounted);
}
//force pausing when the player is out of sector time
if(state.isOutOfTime()){
if(!state.wasTimeout){
universe.displayTimeEnd();
state.wasTimeout = true;
}
//if no turn was run.
if(state.isOutOfTime()){
state.set(State.paused);
}
}
if(!state.isPaused()){
if(state.isCampaign()){
state.secinfo.update();

View File

@ -70,7 +70,7 @@ public class HudFragment extends Fragment{
//paused table
parent.fill(t -> {
t.top().visible(() -> state.isPaused() && !state.isOutOfTime()).touchable = Touchable.disabled;
t.top().visible(() -> state.isPaused()).touchable = Touchable.disabled;
t.table(Styles.black5, top -> top.add("@paused").style(Styles.outlineLabel).pad(8f)).growX();
});
@ -275,7 +275,7 @@ public class HudFragment extends Fragment{
//paused table for when the player is out of time
parent.fill(t -> {
t.top().visible(() -> state.isOutOfTime());
t.top().visible(() -> false);
t.table(Styles.black5, top -> {
//TODO localize
top.add(sectorText).style(Styles.outlineLabel).color(Pal.accent).update(l -> {