More tests and sector fixes
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -137,8 +137,10 @@ public class Logic implements ApplicationListener{
|
|||||||
state.rules.infiniteResources = false;
|
state.rules.infiniteResources = false;
|
||||||
state.rules.allowEditRules = false;
|
state.rules.allowEditRules = false;
|
||||||
state.rules.allowEditWorldProcessors = false;
|
state.rules.allowEditWorldProcessors = false;
|
||||||
state.rules.waveTeam.rules().infiniteResources = true;
|
if(state.getPlanet().enemyInfiniteItems){
|
||||||
state.rules.waveTeam.rules().fillItems = true;
|
state.rules.waveTeam.rules().infiniteResources = true;
|
||||||
|
state.rules.waveTeam.rules().fillItems = true;
|
||||||
|
}
|
||||||
state.rules.waveTeam.rules().buildSpeedMultiplier *= state.getPlanet().enemyBuildSpeedMultiplier;
|
state.rules.waveTeam.rules().buildSpeedMultiplier *= state.getPlanet().enemyBuildSpeedMultiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,8 @@ public class Planet extends UnlockableContent{
|
|||||||
public boolean clearSectorOnLose = false;
|
public boolean clearSectorOnLose = false;
|
||||||
/** Multiplier for enemy rebuild speeds; only applied in campaign (not standard rules) */
|
/** Multiplier for enemy rebuild speeds; only applied in campaign (not standard rules) */
|
||||||
public float enemyBuildSpeedMultiplier = 1f;
|
public float enemyBuildSpeedMultiplier = 1f;
|
||||||
|
/** If true, the enemy team always has infinite items. */
|
||||||
|
public boolean enemyInfiniteItems = true;
|
||||||
/** If true, enemy cores are replaced with spawnpoints on this planet (for invasions) */
|
/** If true, enemy cores are replaced with spawnpoints on this planet (for invasions) */
|
||||||
public boolean enemyCoreSpawnReplace = false;
|
public boolean enemyCoreSpawnReplace = false;
|
||||||
/** If true, blocks in the radius of the core will be removed and "built up" in a shockwave upon landing. */
|
/** If true, blocks in the radius of the core will be removed and "built up" in a shockwave upon landing. */
|
||||||
|
|||||||
@@ -897,8 +897,9 @@ public class ApplicationTests{
|
|||||||
ObjectSet<Item> resources = new ObjectSet<>();
|
ObjectSet<Item> resources = new ObjectSet<>();
|
||||||
boolean hasSpawnPoint = false;
|
boolean hasSpawnPoint = false;
|
||||||
|
|
||||||
assertFalse(state.rules.infiniteResources, "Sector " + zone.name + " must not have infinite resources.");
|
assertFalse(state.rules.infiniteResources || Team.sharded.rules().infiniteResources, "Sector " + zone.name + " must not have infinite resources.");
|
||||||
assertFalse(state.rules.allowEditRules, "Sector " + zone.name + " must not have rule editing enabled.");
|
assertFalse(state.rules.allowEditRules, "Sector " + zone.name + " must not have rule editing enabled.");
|
||||||
|
assertFalse(state.rules.allowEditWorldProcessors, "Sector " + zone.name + " must not have world processor editing enabled.");
|
||||||
assertEquals(Team.sharded, state.rules.defaultTeam, "Sector " + zone.name + " must have the Sharded player team.");
|
assertEquals(Team.sharded, state.rules.defaultTeam, "Sector " + zone.name + " must have the Sharded player team.");
|
||||||
assertEquals(Vars.state.getPlanet() == Planets.serpulo ? Team.crux : Team.malis, state.rules.waveTeam, "Sector " + zone.name + " must have the correct enemy team.");
|
assertEquals(Vars.state.getPlanet() == Planets.serpulo ? Team.crux : Team.malis, state.rules.waveTeam, "Sector " + zone.name + " must have the correct enemy team.");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user