Fix IDE0090

This commit is contained in:
RoosterDragon
2023-04-05 19:34:12 +01:00
committed by Pavel Penev
parent 164abfdae1
commit 8a285f9b19
385 changed files with 790 additions and 794 deletions

View File

@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly int Duration = 0;
[Desc("Allowed to land on.")]
public readonly HashSet<string> TerrainTypes = new HashSet<string>();
public readonly HashSet<string> TerrainTypes = new();
[Desc("Define actors that can collect crates by setting this into the Crushes field from the Mobile trait.")]
public readonly string CrushClass = "crate";

View File

@@ -33,10 +33,10 @@ namespace OpenRA.Mods.Common.Traits
public readonly int MaxRadius = 4;
[Desc("The list of unit target types we are allowed to duplicate.")]
public readonly BitSet<TargetableType> ValidTargets = new BitSet<TargetableType>("Ground", "Water");
public readonly BitSet<TargetableType> ValidTargets = new("Ground", "Water");
[Desc("Which factions this crate action can occur for.")]
public readonly HashSet<string> ValidFactions = new HashSet<string>();
public readonly HashSet<string> ValidFactions = new();
[Desc("Is the new duplicates given to a specific owner, regardless of whom collected it?")]
public readonly string Owner = null;

View File

@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly string[] Units = Array.Empty<string>();
[Desc("Factions that are allowed to trigger this action.")]
public readonly HashSet<string> ValidFactions = new HashSet<string>();
public readonly HashSet<string> ValidFactions = new();
[Desc("Override the owner of the newly spawned unit: e.g. Creeps or Neutral")]
public readonly string Owner = null;
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits
{
readonly Actor self;
readonly GiveUnitCrateActionInfo info;
readonly List<CPos> usedCells = new List<CPos>();
readonly List<CPos> usedCells = new();
public GiveUnitCrateAction(Actor self, GiveUnitCrateActionInfo info)
: base(self, info)

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly int Duration = 0;
[Desc("The range to search for extra collectors in.", "Extra collectors will also be granted the crate action.")]
public readonly WDist Range = new WDist(3);
public readonly WDist Range = new(3);
[Desc("The maximum number of extra collectors to grant the crate action to.", "-1 = no limit")]
public readonly int MaxExtraCollectors = 4;

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits
public readonly int Levels = 1;
[Desc("The range to search for extra collectors in.", "Extra collectors will also be granted the crate action.")]
public readonly WDist Range = new WDist(3);
public readonly WDist Range = new(3);
[Desc("The maximum number of extra collectors to grant the crate action to.")]
public readonly int MaxExtraCollectors = 4;