Minor logic unit rotation fix / Core capture unit derelict tareting
This commit is contained in:
@@ -97,7 +97,7 @@ public class Team implements Comparable<Team>{
|
||||
}
|
||||
|
||||
public boolean isEnemy(Team other){
|
||||
return state.teams.areEnemies(this, other);
|
||||
return this != other;
|
||||
}
|
||||
|
||||
public Seq<CoreBuild> cores(){
|
||||
|
||||
@@ -49,7 +49,7 @@ public class Teams{
|
||||
|
||||
public boolean eachEnemyCore(Team team, Boolf<CoreBuild> ret){
|
||||
for(TeamData data : active){
|
||||
if(areEnemies(team, data.team)){
|
||||
if(team != data.team){
|
||||
for(CoreBuild tile : data.cores){
|
||||
if(ret.get(tile)){
|
||||
return true;
|
||||
@@ -62,7 +62,7 @@ public class Teams{
|
||||
|
||||
public void eachEnemyCore(Team team, Cons<Building> ret){
|
||||
for(TeamData data : active){
|
||||
if(areEnemies(team, data.team)){
|
||||
if(team != data.team){
|
||||
for(Building tile : data.cores){
|
||||
ret.get(tile);
|
||||
}
|
||||
@@ -91,11 +91,6 @@ public class Teams{
|
||||
return get(team).active();
|
||||
}
|
||||
|
||||
/** Returns whether {@param other} is an enemy of {@param #team}. */
|
||||
public boolean areEnemies(Team team, Team other){
|
||||
return team != other;
|
||||
}
|
||||
|
||||
public boolean canInteract(Team team, Team other){
|
||||
return team == other || other == Team.derelict;
|
||||
}
|
||||
@@ -216,7 +211,7 @@ public class Teams{
|
||||
Seq<Team> enemies = new Seq<>();
|
||||
|
||||
for(TeamData other : active){
|
||||
if(areEnemies(data.team, other.team)){
|
||||
if(data.team != other.team){
|
||||
enemies.add(other.team);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user