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.

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 */

View File

@@ -338,17 +338,20 @@ 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;
//replace all broken blocks //if there's still an enemy base left, fix it
for(var plan : state.rules.waveTeam.data().blocks){ if(state.rules.attackMode){
Tile tile = world.tile(plan.x, plan.y); //replace all broken blocks
if(tile != null){ for(var plan : state.rules.waveTeam.data().blocks){
tile.setBlock(content.block(plan.block), state.rules.waveTeam, plan.rotation); Tile tile = world.tile(plan.x, plan.y);
if(plan.config != null && tile.build != null){ if(tile != null){
tile.build.configure(plan.config); tile.setBlock(content.block(plan.block), state.rules.waveTeam, plan.rotation);
if(plan.config != null && tile.build != null){
tile.build.configure(plan.config);
}
} }
} }
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();

View File

@@ -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();
} }
}; };

View File

@@ -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