New WIP achievement definitions
This commit is contained in:
@@ -286,6 +286,11 @@ public class Teams{
|
||||
return buildingTypes.get(block, () -> new Seq<>(false));
|
||||
}
|
||||
|
||||
public int getCount(Block block){
|
||||
var res = buildingTypes.get(block);
|
||||
return res == null ? 0 : res.size;
|
||||
}
|
||||
|
||||
/** Destroys this team's presence on the map, killing part of its buildings and converting everything to 'derelict'. */
|
||||
public void destroyToDerelict(){
|
||||
|
||||
@@ -355,6 +360,12 @@ public class Teams{
|
||||
}
|
||||
}
|
||||
|
||||
//this is just an alias for consistency
|
||||
@Nullable
|
||||
public Seq<Unit> getUnits(UnitType type){
|
||||
return unitCache(type);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Seq<Unit> unitCache(UnitType type){
|
||||
if(unitsByType == null || unitsByType.length <= type.id || unitsByType[type.id] == null) return null;
|
||||
|
||||
Reference in New Issue
Block a user