This commit is contained in:
Anuken
2020-11-22 11:59:53 -05:00
parent 19638da99d
commit 909dff7608
12 changed files with 121 additions and 13 deletions

View File

@@ -5,6 +5,7 @@ import arc.math.*;
import arc.math.geom.*;
import arc.struct.*;
import arc.util.*;
import mindustry.ai.*;
import mindustry.ai.BaseRegistry.*;
import mindustry.content.*;
import mindustry.game.*;
@@ -146,6 +147,15 @@ public class BaseGenerator{
}
});
}
//clear path for ground units
for(Tile tile : cores){
Astar.pathfind(tile, spawn, t -> t.team() == state.rules.waveTeam && !t.within(tile, 25f * 8) ? 100000 : t.floor().hasSurface() ? 1 : 10, t -> !t.block().isStatic()).each(t -> {
if(t.team() == state.rules.waveTeam && !t.within(tile, 25f * 8)){
t.setBlock(Blocks.air);
}
});
}
}
public void postGenerate(){