mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-09 20:29:06 +07:00
Removed "sector attacked" message
This commit is contained in:
parent
2f6f205dc7
commit
ee50995dde
@ -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);
|
||||
|
@ -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(){
|
||||
|
||||
|
@ -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";
|
||||
|
@ -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(){
|
||||
|
Loading…
Reference in New Issue
Block a user