mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-04 23:38:10 +07:00
Removed "sector attacked" message
This commit is contained in:
@ -77,14 +77,18 @@ public class WaveSpawner{
|
|||||||
|
|
||||||
eachGroundSpawn((spawnX, spawnY, doShockwave) -> {
|
eachGroundSpawn((spawnX, spawnY, doShockwave) -> {
|
||||||
if(doShockwave){
|
if(doShockwave){
|
||||||
Time.run(20f, () -> Fx.spawnShockwave.at(spawnX, spawnY, state.rules.dropZoneRadius));
|
doShockwave(spawnX, spawnY);
|
||||||
Time.run(40f, () -> Damage.damage(state.rules.waveTeam, spawnX, spawnY, state.rules.dropZoneRadius, 99999999f, true));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Time.runTask(121f, () -> spawning = false);
|
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){
|
private void eachGroundSpawn(SpawnConsumer cons){
|
||||||
for(Tile spawn : spawns){
|
for(Tile spawn : spawns){
|
||||||
cons.accept(spawn.worldx(), spawn.worldy(), true);
|
cons.accept(spawn.worldx(), spawn.worldy(), true);
|
||||||
|
@ -116,7 +116,6 @@ abstract class BuilderComp implements Unitc{
|
|||||||
current.progress = entity.progress;
|
current.progress = entity.progress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Draw all current build requests. Does not draw the beam effect, only the positions. */
|
/** Draw all current build requests. Does not draw the beam effect, only the positions. */
|
||||||
void drawBuildRequests(){
|
void drawBuildRequests(){
|
||||||
|
|
||||||
|
@ -84,20 +84,6 @@ public class HudFragment extends Fragment{
|
|||||||
coreItems.clear();
|
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
|
//paused table
|
||||||
parent.fill(t -> {
|
parent.fill(t -> {
|
||||||
t.name = "paused";
|
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
|
@Override
|
||||||
public void placed(){
|
public void placed(){
|
||||||
|
Reference in New Issue
Block a user