Bugfixes
This commit is contained in:
@@ -208,16 +208,30 @@ public class BlockIndexer{
|
||||
public Seq<Tile> getEnemy(Team team, BlockFlag type){
|
||||
returnArray.clear();
|
||||
Seq<TeamData> data = state.teams.present;
|
||||
for(int i = 0; i < data.size; i++){
|
||||
Team enemy = data.items[i].team;
|
||||
if(enemy == team) continue;
|
||||
TileArray set = getFlagged(enemy)[type.ordinal()];
|
||||
if(set != null){
|
||||
for(Tile tile : set){
|
||||
returnArray.add(tile);
|
||||
//when team data is not initialized, scan through every team. this is terrible
|
||||
if(data.isEmpty()){
|
||||
for(Team enemy : Team.all){
|
||||
if(enemy == team) continue;
|
||||
TileArray set = getFlagged(enemy)[type.ordinal()];
|
||||
if(set != null){
|
||||
for(Tile tile : set){
|
||||
returnArray.add(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for(int i = 0; i < data.size; i++){
|
||||
Team enemy = data.items[i].team;
|
||||
if(enemy == team) continue;
|
||||
TileArray set = getFlagged(enemy)[type.ordinal()];
|
||||
if(set != null){
|
||||
for(Tile tile : set){
|
||||
returnArray.add(tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return returnArray;
|
||||
}
|
||||
|
||||
|
||||
@@ -351,13 +351,7 @@ public class Pathfinder implements Runnable{
|
||||
threadList.add(path);
|
||||
|
||||
//add to main thread's list of paths
|
||||
Core.app.post(() -> {
|
||||
mainList.add(path);
|
||||
//TODO
|
||||
//if(fieldMap[team.id] != null){
|
||||
// fieldMap[team.id].put(target, path);
|
||||
//}
|
||||
});
|
||||
Core.app.post(() -> mainList.add(path));
|
||||
|
||||
//fill with impassables by default
|
||||
for(int x = 0; x < world.width(); x++){
|
||||
|
||||
@@ -31,7 +31,7 @@ public class SectorPresets implements ContentList{
|
||||
difficulty = 2;
|
||||
}};
|
||||
|
||||
biomassFacility = new SectorPreset("biomassResearchFacility", serpulo, 81){{
|
||||
biomassFacility = new SectorPreset("biomassFacility", serpulo, 81){{
|
||||
captureWave = 20;
|
||||
difficulty = 3;
|
||||
}};
|
||||
|
||||
@@ -30,9 +30,7 @@ public class SchematicsDialog extends BaseDialog{
|
||||
|
||||
public SchematicsDialog(){
|
||||
super("@schematics");
|
||||
Core.assets.load("sprites/schematic-background.png", Texture.class).loaded = t -> {
|
||||
((Texture)t).setWrap(TextureWrap.repeat);
|
||||
};
|
||||
Core.assets.load("sprites/schematic-background.png", Texture.class).loaded = t -> ((Texture)t).setWrap(TextureWrap.repeat);
|
||||
|
||||
shouldPause = true;
|
||||
addCloseButton();
|
||||
|
||||
Reference in New Issue
Block a user