Fixed Impact0078 ore gen / Misc campaign fixes

This commit is contained in:
Anuken
2020-11-26 20:46:17 -05:00
parent 0a290d2e10
commit c8b425116e
5 changed files with 18 additions and 10 deletions
Binary file not shown.
+1 -1
View File
@@ -88,7 +88,7 @@ public class Vars implements Loadable{
/** duration of time between turns in ticks */ /** duration of time between turns in ticks */
public static final float turnDuration = 2 * Time.toMinutes; public static final float turnDuration = 2 * Time.toMinutes;
/** chance of an invasion per turn, 1 = 100% */ /** chance of an invasion per turn, 1 = 100% */
public static final float baseInvasionChance = 1f / 75f; public static final float baseInvasionChance = 1f / 80f;
/** how many turns have to pass before invasions start */ /** how many turns have to pass before invasions start */
public static final int invasionGracePeriod = 20; public static final int invasionGracePeriod = 20;
/** min armor fraction damage; e.g. 0.05 = at least 5% damage */ /** min armor fraction damage; e.g. 0.05 = at least 5% damage */
+3
View File
@@ -338,6 +338,8 @@ public class Control implements ApplicationListener, Loadable{
//reset win wave?? //reset win wave??
state.rules.winWave = state.rules.attackMode ? -1 : sector.preset != null ? sector.preset.captureWave : 40; state.rules.winWave = state.rules.attackMode ? -1 : sector.preset != null ? sector.preset.captureWave : 40;
//if there's still an enemy base left, fix it
if(state.rules.attackMode){
//replace all broken blocks //replace all broken blocks
for(var plan : state.rules.waveTeam.data().blocks){ for(var plan : state.rules.waveTeam.data().blocks){
Tile tile = world.tile(plan.x, plan.y); Tile tile = world.tile(plan.x, plan.y);
@@ -349,6 +351,7 @@ public class Control implements ApplicationListener, Loadable{
} }
} }
state.rules.waveTeam.data().blocks.clear(); state.rules.waveTeam.data().blocks.clear();
}
//kill all units, since they should be dead anyway //kill all units, since they should be dead anyway
Groups.unit.clear(); Groups.unit.clear();
@@ -562,7 +562,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
if(t.getChildren().any()){ if(t.getChildren().any()){
c.add(name).left().row(); c.add(name).left().row();
c.add(t).padLeft(10f).row(); c.add(t).padLeft(10f).left().row();
} }
}; };
@@ -56,6 +56,11 @@ public class LaunchPad extends Block{
bars.add("items", entity -> new Bar(() -> Core.bundle.format("bar.items", entity.items.total()), () -> Pal.items, () -> (float)entity.items.total() / itemCapacity)); bars.add("items", entity -> new Bar(() -> Core.bundle.format("bar.items", entity.items.total()), () -> Pal.items, () -> (float)entity.items.total() / itemCapacity));
} }
@Override
public boolean outputsItems(){
return false;
}
public class LaunchPadBuild extends Building{ public class LaunchPadBuild extends Building{
@Override @Override