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

@@ -95,8 +95,8 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
"then AttackOrFlee is Flee"
};
public static readonly AttackOrFleeFuzzy Default = new AttackOrFleeFuzzy(null, null, null);
public static readonly AttackOrFleeFuzzy Rush = new AttackOrFleeFuzzy(new[]
public static readonly AttackOrFleeFuzzy Default = new(null, null, null);
public static readonly AttackOrFleeFuzzy Rush = new(new[]
{
"if ((OwnHealth is Normal) " +
"and ((EnemyHealth is NearDead) or (EnemyHealth is Injured) or (EnemyHealth is Normal)) " +
@@ -111,7 +111,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
"then AttackOrFlee is Flee"
}, null, null);
readonly MamdaniFuzzySystem fuzzyEngine = new MamdaniFuzzySystem();
readonly MamdaniFuzzySystem fuzzyEngine = new();
public AttackOrFleeFuzzy(
IEnumerable<string> rulesForNormalOwnHealth,

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
public class Squad
{
public List<Actor> Units = new List<Actor>();
public List<Actor> Units = new();
public SquadType Type;
internal IBot Bot;

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
{
abstract class AirStateBase : StateBase
{
static readonly BitSet<TargetableType> AirTargetTypes = new BitSet<TargetableType>("Air");
static readonly BitSet<TargetableType> AirTargetTypes = new("Air");
protected const int MissileUnitMultiplier = 3;