Merging changes from private branch

This commit is contained in:
Anuken
2025-04-04 11:47:35 -04:00
parent cf5c6d0905
commit b7dbe54d76
161 changed files with 2484 additions and 1137 deletions

View File

@@ -126,6 +126,15 @@ public class Teams{
return active;
}
public void updateActive(Team team){
TeamData data = get(team);
//register in active list if needed
if(data.active() && !active.contains(data)){
active.add(data);
updateEnemies();
}
}
public void registerCore(CoreBuild core){
TeamData data = get(core.team);
//add core if not present
@@ -407,13 +416,18 @@ public class Teams{
}
public boolean active(){
return (team == state.rules.waveTeam && state.rules.waves) || cores.size > 0;
return (team == state.rules.waveTeam && state.rules.waves) || cores.size > 0 || buildings.size > 0 || (team == Team.neoplastic && units.size > 0);
}
public boolean hasCore(){
return cores.size > 0;
}
/** @return whether this team has any cores (standard team), or any hearts (neoplasm). */
public boolean isAlive(){
return hasCore();
}
public boolean noCores(){
return cores.isEmpty();
}