Fix CA1851, assume_method_enumerates_parameters = true

This commit is contained in:
RoosterDragon
2023-07-14 20:30:08 +01:00
committed by abcdefg30
parent 3275875ae5
commit 93a97d5d6f
37 changed files with 108 additions and 96 deletions

View File

@@ -239,9 +239,10 @@ namespace OpenRA.Mods.Common.Traits
CPos ChooseRallyLocationNear(Actor producer)
{
var possibleRallyPoints = world.Map.FindTilesInCircle(producer.Location, Info.RallyPointScanRadius)
.Where(c => IsRallyPointValid(c, producer.Info.TraitInfoOrDefault<BuildingInfo>()));
.Where(c => IsRallyPointValid(c, producer.Info.TraitInfoOrDefault<BuildingInfo>()))
.ToList();
if (!possibleRallyPoints.Any())
if (possibleRallyPoints.Count == 0)
{
AIUtils.BotDebug("{0} has no possible rallypoint near {1}", producer.Owner, producer.Location);
return producer.Location;