Minor achievement cleanup
This commit is contained in:
@@ -301,6 +301,7 @@ public class Control implements ApplicationListener, Loadable{
|
||||
player.set(spawn.x * tilesize, spawn.y * tilesize);
|
||||
camera.position.set(player);
|
||||
|
||||
Events.fire(new SectorLaunchEvent(sector));
|
||||
Events.fire(Trigger.newGame);
|
||||
}
|
||||
|
||||
@@ -324,6 +325,7 @@ public class Control implements ApplicationListener, Loadable{
|
||||
sector.info.destination = origin;
|
||||
logic.play();
|
||||
control.saves.saveSector(sector);
|
||||
Events.fire(new SectorLaunchEvent(sector));
|
||||
Events.fire(Trigger.newGame);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -357,6 +357,7 @@ public class UI implements ApplicationListener, Loadable{
|
||||
hide();
|
||||
listener.run();
|
||||
}).size(110, 50).pad(4);
|
||||
closeOnBack();
|
||||
}}.show();
|
||||
}
|
||||
|
||||
@@ -365,6 +366,7 @@ public class UI implements ApplicationListener, Loadable{
|
||||
getCell(cont).growX();
|
||||
cont.margin(15).add(info).width(400f).wrap().get().setAlignment(Align.left);
|
||||
buttons.button("@ok", this::hide).size(110, 50).pad(4);
|
||||
closeOnBack();
|
||||
}}.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +96,14 @@ public class EventType{
|
||||
}
|
||||
}
|
||||
|
||||
public static class SectorLaunchEvent{
|
||||
public final Sector sector;
|
||||
|
||||
public SectorLaunchEvent(Sector sector){
|
||||
this.sector = sector;
|
||||
}
|
||||
}
|
||||
|
||||
public static class CommandIssueEvent{
|
||||
public final Building tile;
|
||||
public final UnitCommand command;
|
||||
|
||||
@@ -18,7 +18,7 @@ import static mindustry.Vars.*;
|
||||
|
||||
public class Planet extends UnlockableContent{
|
||||
/** Default spacing between planet orbits in world units. */
|
||||
private static final float orbitSpacing = 8f;
|
||||
private static final float orbitSpacing = 9f;
|
||||
/** intersect() temp var. */
|
||||
private static final Vec3 intersectResult = new Vec3();
|
||||
/** Mesh used for rendering. Created on load() - will be null on the server! */
|
||||
|
||||
@@ -383,8 +383,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
stable.row();
|
||||
|
||||
if(sector.info.wavesSurvived >= 0 && sector.info.wavesSurvived - sector.info.wavesPassed >= 0 && !sector.isBeingPlayed()){
|
||||
int toCapture = sector.info.attack || sector.info.winWave <= 1 ? -1 : sector.info.winWave - (sector.info.wave + sector.info.wavesPassed);
|
||||
boolean plus = (sector.info.wavesSurvived - sector.info.wavesPassed) >= SectorDamage.maxRetWave - 1;
|
||||
stable.add("[accent]Will survive\n" + (sector.info.wavesSurvived - sector.info.wavesPassed) + (plus ? "+" : "") + " waves");
|
||||
stable.add("[accent]Will survive\n" + (sector.info.wavesSurvived - sector.info.wavesPassed) +
|
||||
(plus ? "+" : "") + (toCapture < 0 ? "" : "/" + toCapture) + " waves");
|
||||
stable.row();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user