Added "Launching From" info

This commit is contained in:
Anuken 2020-11-18 20:05:45 -05:00
parent 8692639e62
commit 72d5a8a768
5 changed files with 7 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

View File

@ -505,6 +505,7 @@ loadout = Loadout
resources = Resources
bannedblocks = Banned Blocks
addall = Add All
launch.from = Launching From: [accent]{0}
launch.destination = Destination: {0}
configure.invalid = Amount must be a number between 0 and {0}.
zone.unlocked = [lightgray]{0} unlocked.

View File

@ -43,6 +43,8 @@ public class SectorInfo{
public boolean waves = true;
/** Whether attack mode is enabled here. */
public boolean attack = false;
/** Whether this sector has any enemy spawns. */
public boolean hasSpawns = true;
/** Wave # from state */
public int wave = 1, winWave = -1;
/** Waves this sector can survive if under attack. Based on wave in info. <0 means uncalculated. */
@ -168,6 +170,7 @@ public class SectorInfo{
secondsPassed = 0;
wavesPassed = 0;
damage = 0;
hasSpawns = spawner.countSpawns() > 0;
if(state.rules.sector != null){
state.rules.sector.saveInfo();

View File

@ -206,7 +206,7 @@ public class Universe{
}
//queue random invasions
if(!sector.isAttacked() && turn > invasionGracePeriod){
if(!sector.isAttacked() && turn > invasionGracePeriod && sector.info.hasSpawns){
//invasion chance depends on # of nearby bases
if(Mathf.chance(baseInvasionChance * sector.near().count(Sector::hasEnemyBase))){
int waveMax = Math.max(sector.info.winWave, sector.isBeingPlayed() ? state.wave : sector.info.wave + sector.info.wavesPassed) + Mathf.random(2, 5) * 5;

View File

@ -103,6 +103,8 @@ public class LaunchLoadoutDialog extends BaseDialog{
ButtonGroup<Button> group = new ButtonGroup<>();
selected = universe.getLoadout(core);
cont.add(Core.bundle.format("launch.from", sector.name())).row();
cont.pane(t -> {
int i = 0;