.Any(), .Count() -> .Count or .Length
This commit is contained in:
committed by
atlimit8
parent
6eb4fe8980
commit
79f321cb44
@@ -68,7 +68,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
|
||||
FuzzyStateMachine.Update(this);
|
||||
}
|
||||
|
||||
public bool IsValid => Units.Any();
|
||||
public bool IsValid => Units.Count > 0;
|
||||
|
||||
public Actor TargetActor
|
||||
{
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
|
||||
var unitsAroundPos = owner.World.FindActorsInCircle(loc, WDist.FromCells(dangerRadius))
|
||||
.Where(owner.SquadManager.IsPreferredEnemyUnit).ToList();
|
||||
|
||||
if (!unitsAroundPos.Any())
|
||||
if (unitsAroundPos.Count == 0)
|
||||
return true;
|
||||
|
||||
if (CountAntiAirUnits(unitsAroundPos) * MissileUnitMultiplier < owner.Units.Count)
|
||||
|
||||
Reference in New Issue
Block a user