Fix IDE0028, IDE0300, IDE0301, IDE0302, IDE0303, IDE0304.

Silence IDE0305.
This commit is contained in:
RoosterDragon
2025-03-03 17:29:45 +00:00
committed by Pavel Penev
parent 0740991c12
commit 79454d8fd2
559 changed files with 1661 additions and 1751 deletions

View File

@@ -29,12 +29,12 @@ namespace OpenRA.Mods.Common.Activities
readonly Color? targetLineColor;
static readonly BlockedByActor[] PathSearchOrder =
{
[
BlockedByActor.All,
BlockedByActor.Stationary,
BlockedByActor.Immovable,
BlockedByActor.None
};
];
int carryoverProgress;
int lastMovePartCompletedTick;
@@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Activities
return (true, PathFinder.NoPath);
return (false, mobile.PathFinder.FindPathToTargetCell(
self, new[] { mobile.ToCell }, destination, check, laneBias: false));
self, [mobile.ToCell], destination, check, laneBias: false));
};
this.destination = destination;
@@ -88,7 +88,7 @@ namespace OpenRA.Mods.Common.Activities
return (true, PathFinder.NoPath);
return (false, mobile.PathFinder.FindPathToTargetCell(
self, new[] { mobile.ToCell }, this.destination.Value, check, ignoreActor: ignoreActor));
self, [mobile.ToCell], this.destination.Value, check, ignoreActor: ignoreActor));
};
// Note: Will be recalculated from OnFirstRun if evaluateNearestMovableCell is true
@@ -379,7 +379,7 @@ namespace OpenRA.Mods.Common.Activities
if (path != null)
return Enumerable.Reverse(path).Select(c => Target.FromCell(self.World, c));
if (destination != null)
return new Target[] { Target.FromCell(self.World, destination.Value) };
return [Target.FromCell(self.World, destination.Value)];
return Target.None;
}

View File

@@ -112,7 +112,7 @@ namespace OpenRA.Mods.Common.Activities
return true;
}
protected readonly List<CPos> SearchCells = new();
protected readonly List<CPos> SearchCells = [];
protected int searchCellsTick = -1;