Fix IDE0090
This commit is contained in:
committed by
Pavel Penev
parent
164abfdae1
commit
8a285f9b19
@@ -55,10 +55,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
|
||||
public readonly ExternalConditionInfo Info;
|
||||
readonly Dictionary<object, HashSet<int>> permanentTokens = new Dictionary<object, HashSet<int>>();
|
||||
readonly Dictionary<object, HashSet<int>> permanentTokens = new();
|
||||
|
||||
// Tokens are sorted on insert/remove by ascending expiry time
|
||||
readonly List<TimedToken> timedTokens = new List<TimedToken>();
|
||||
readonly List<TimedToken> timedTokens = new();
|
||||
IConditionTimerWatcher[] watchers;
|
||||
int duration;
|
||||
int expires;
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly string Condition = null;
|
||||
|
||||
[Desc("Name of the armaments that grant this condition.")]
|
||||
public readonly HashSet<string> ArmamentNames = new HashSet<string>() { "primary" };
|
||||
public readonly HashSet<string> ArmamentNames = new() { "primary" };
|
||||
|
||||
[Desc("Shots required to apply an instance of the condition. If there are more instances of the condition granted than values listed,",
|
||||
"the last value is used for all following instances beyond the defined range.")]
|
||||
@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public class GrantConditionOnAttack : PausableConditionalTrait<GrantConditionOnAttackInfo>, INotifyCreated, ITick, INotifyAttack
|
||||
{
|
||||
readonly Stack<int> tokens = new Stack<int>();
|
||||
readonly Stack<int> tokens = new();
|
||||
|
||||
int cooldown = 0;
|
||||
int shotsFired = 0;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly string DeployedCondition = null;
|
||||
|
||||
[Desc("The terrain types that this actor can deploy on. Leave empty to allow any.")]
|
||||
public readonly HashSet<string> AllowedTerrainTypes = new HashSet<string>();
|
||||
public readonly HashSet<string> AllowedTerrainTypes = new();
|
||||
|
||||
[Desc("Can this actor deploy on slopes?")]
|
||||
public readonly bool CanDeployOnRamps = false;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly string Condition = null;
|
||||
|
||||
[Desc("Only grant this condition for certain factions.")]
|
||||
public readonly HashSet<string> Factions = new HashSet<string>();
|
||||
public readonly HashSet<string> Factions = new();
|
||||
|
||||
[Desc("Should it recheck everything when it is captured?")]
|
||||
public readonly bool ResetOnOwnerChange = false;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
[ActorReference]
|
||||
[Desc("The actors to grant condition for. If empty condition will be granted for all actors.")]
|
||||
public readonly HashSet<string> Actors = new HashSet<string>();
|
||||
public readonly HashSet<string> Actors = new();
|
||||
|
||||
[Desc("How long condition is applies for. Use -1 for infinite.")]
|
||||
public readonly int Duration = -1;
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public class LineBuildSegmentExternalCondition : ConditionalTrait<LineBuildSegmentExternalConditionInfo>, INotifyLineBuildSegmentsChanged
|
||||
{
|
||||
readonly HashSet<Actor> segments = new HashSet<Actor>();
|
||||
readonly Dictionary<Actor, int> tokens = new Dictionary<Actor, int>();
|
||||
readonly HashSet<Actor> segments = new();
|
||||
readonly Dictionary<Actor, int> tokens = new();
|
||||
|
||||
public LineBuildSegmentExternalCondition(LineBuildSegmentExternalConditionInfo info)
|
||||
: base(info) { }
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
readonly Actor self;
|
||||
|
||||
readonly Dictionary<Actor, int> tokens = new Dictionary<Actor, int>();
|
||||
readonly Dictionary<Actor, int> tokens = new();
|
||||
|
||||
int proximityTrigger;
|
||||
WPos cachedPosition;
|
||||
|
||||
Reference in New Issue
Block a user