Sector tweaks
This commit is contained in:
@@ -283,6 +283,17 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
|
|
||||||
//if there is no base, simulate a new game and place the right loadout at the spawn position
|
//if there is no base, simulate a new game and place the right loadout at the spawn position
|
||||||
if(state.rules.defaultTeam.cores().isEmpty()){
|
if(state.rules.defaultTeam.cores().isEmpty()){
|
||||||
|
|
||||||
|
//no spawn set -> delete the sector save
|
||||||
|
if(sector.info.spawnPosition == 0){
|
||||||
|
//delete old save
|
||||||
|
sector.save = null;
|
||||||
|
slot.delete();
|
||||||
|
//play again
|
||||||
|
playSector(origin, sector);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//reset wave so things are more fair
|
//reset wave so things are more fair
|
||||||
state.wave = 1;
|
state.wave = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ public class Universe{
|
|||||||
sector.info.damage = 1f;
|
sector.info.damage = 1f;
|
||||||
sector.info.hasCore = false;
|
sector.info.hasCore = false;
|
||||||
sector.info.production.clear();
|
sector.info.production.clear();
|
||||||
}else if(attacked && wavesPassed > 0 && sector.info.wave + wavesPassed >= sector.info.winWave && !sector.hasEnemyBase()){
|
}else if(attacked && wavesPassed > 0 && sector.info.winWave > 1 && sector.info.wave + wavesPassed >= sector.info.winWave && !sector.hasEnemyBase()){
|
||||||
//autocapture the sector
|
//autocapture the sector
|
||||||
sector.info.waves = false;
|
sector.info.waves = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user