Removed "sector attacked" message

This commit is contained in:
Anuken 2020-10-11 14:54:05 -04:00
parent 2f6f205dc7
commit ee50995dde
4 changed files with 22 additions and 17 deletions

View File

@ -77,14 +77,18 @@ public class WaveSpawner{
eachGroundSpawn((spawnX, spawnY, doShockwave) -> {
if(doShockwave){
Time.run(20f, () -> Fx.spawnShockwave.at(spawnX, spawnY, state.rules.dropZoneRadius));
Time.run(40f, () -> Damage.damage(state.rules.waveTeam, spawnX, spawnY, state.rules.dropZoneRadius, 99999999f, true));
doShockwave(spawnX, spawnY);
}
});
Time.runTask(121f, () -> spawning = false);
}
public void doShockwave(float x, float y){
Time.run(20f, () -> Fx.spawnShockwave.at(x, y, state.rules.dropZoneRadius));
Time.run(40f, () -> Damage.damage(state.rules.waveTeam, x, y, state.rules.dropZoneRadius, 99999999f, true));
}
private void eachGroundSpawn(SpawnConsumer cons){
for(Tile spawn : spawns){
cons.accept(spawn.worldx(), spawn.worldy(), true);

View File

@ -116,7 +116,6 @@ abstract class BuilderComp implements Unitc{
current.progress = entity.progress;
}
/** Draw all current build requests. Does not draw the beam effect, only the positions. */
void drawBuildRequests(){

View File

@ -84,20 +84,6 @@ public class HudFragment extends Fragment{
coreItems.clear();
});
Events.on(TurnEvent.class, e -> {
Seq<Sector> attacked = universe.getAttacked(state.getSector().planet);
if(attacked.any()){
//TODO localize
String text = attacked.size > 1 ? attacked.size + " sectors attacked." : "Sector " + attacked.first().id + " under attack.";
showToast(Icon.warning, text);
}
//ui.announce("[accent][[ Turn " + universe.turn() + " ]\n[scarlet]" + attackedSectors.size + "[lightgray] sector(s) attacked.");
});
//paused table
parent.fill(t -> {
t.name = "paused";

View File

@ -310,6 +310,22 @@ public class CoreBlock extends StorageBlock{
}
}
@Override
public void onDestroyed(){
super.onDestroyed();
if(state.isCampaign() && team == state.rules.waveTeam){
//do not recache
world.setGenerating(true);
tile.setOverlay(Blocks.spawn);
world.setGenerating(false);
if(!spawner.getSpawns().contains(tile)){
spawner.getSpawns().add(tile);
}
spawner.doShockwave(x, y);
}
}
@Override
public void placed(){