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

@@ -17,7 +17,6 @@ using OpenRA.Mods.Cnc.Effects;
using OpenRA.Mods.Common;
using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Traits;
using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
@@ -26,7 +25,7 @@ namespace OpenRA.Mods.Cnc.Traits
{
[FieldLoader.Require]
[Desc("Drop pod unit")]
[ActorReference(new[] { typeof(AircraftInfo), typeof(FallsToEarthInfo) })]
[ActorReference([typeof(AircraftInfo), typeof(FallsToEarthInfo)])]
public readonly string[] UnitTypes = null;
[Desc("Number of drop pods spawned.")]
@@ -82,8 +81,8 @@ namespace OpenRA.Mods.Cnc.Traits
{
readonly DropPodsPowerInfo info;
readonly string[] unitTypes;
readonly Dictionary<string, Func<CPos, WPos>> getLaunchLocation = new();
readonly Dictionary<string, HashSet<string>> landableTerrainTypes = new();
readonly Dictionary<string, Func<CPos, WPos>> getLaunchLocation = [];
readonly Dictionary<string, HashSet<string>> landableTerrainTypes = [];
public DropPodsPower(Actor self, DropPodsPowerInfo info)
: base(self, info)
@@ -134,11 +133,11 @@ namespace OpenRA.Mods.Cnc.Traits
if (info.CameraActor != null)
{
var camera = world.CreateActor(info.CameraActor, new TypeDictionary
{
var camera = world.CreateActor(info.CameraActor,
[
new LocationInit(targetCell),
new OwnerInit(self.Owner),
});
]);
camera.QueueActivity(new Wait(info.CameraRemoveDelay));
camera.QueueActivity(new RemoveSelf());
@@ -166,12 +165,12 @@ namespace OpenRA.Mods.Cnc.Traits
var dropLocation = validDropLocations.Random(world.SharedRandom);
var launchLocation = getLaunchLocation[unitType](dropLocation);
var pod = world.CreateActor(false, unitType, new TypeDictionary
{
var pod = world.CreateActor(false, unitType,
[
new CenterPositionInit(launchLocation),
new OwnerInit(self.Owner),
new FacingInit(info.PodFacing)
});
]);
var aircraft = pod.Trait<Aircraft>();
if (!aircraft.CanLand(dropLocation))