Added "Launching From" info
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user