Fixed: missing spawns / incorrect ranks / jittery movement / tests
This commit is contained in:
@@ -10,7 +10,7 @@ public class DefaultWaves{
|
||||
private static Array<SpawnGroup> spawns;
|
||||
|
||||
public static Array<SpawnGroup> getDefaultSpawns(){
|
||||
if(spawns == null){
|
||||
if(spawns == null && UnitTypes.dagger != null){
|
||||
spawns = Array.with(
|
||||
new SpawnGroup(UnitTypes.dagger){{
|
||||
end = 8;
|
||||
@@ -164,6 +164,6 @@ public class DefaultWaves{
|
||||
}}
|
||||
);
|
||||
}
|
||||
return spawns;
|
||||
return spawns == null ? new Array<>() : spawns;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,5 +28,5 @@ public class Rules{
|
||||
/**Zone ID, -1 for invalid zone.*/
|
||||
public byte zone = -1;
|
||||
/**Spawn layout. Since only zones modify this, it should be assigned on save load.*/
|
||||
public transient Array<SpawnGroup> spawns = new Array<>();
|
||||
public transient Array<SpawnGroup> spawns = DefaultWaves.getDefaultSpawns();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class Stats{
|
||||
|
||||
//each new launch period adds onto the rank 1.5 'points'
|
||||
if(wavesLasted >= zone.conditionWave){
|
||||
score += (float)((zone.conditionWave - wavesLasted) / zone.launchPeriod + 1) * 1.5f;
|
||||
score += (float)((wavesLasted - zone.conditionWave) / zone.launchPeriod + 1) * 1.5f;
|
||||
}
|
||||
|
||||
int capacity = zone.generator.coreBlock.itemCapacity;
|
||||
|
||||
Reference in New Issue
Block a user