Fix IDE0090
This commit is contained in:
committed by
Pavel Penev
parent
164abfdae1
commit
8a285f9b19
@@ -39,7 +39,7 @@ namespace OpenRA.Traits
|
||||
readonly Actor actor;
|
||||
readonly ICreatesFrozenActors frozenTrait;
|
||||
readonly Shroud shroud;
|
||||
readonly List<WPos> targetablePositions = new List<WPos>();
|
||||
readonly List<WPos> targetablePositions = new();
|
||||
|
||||
public Player Viewer { get; }
|
||||
public Player Owner { get; private set; }
|
||||
@@ -253,7 +253,7 @@ namespace OpenRA.Traits
|
||||
readonly Player owner;
|
||||
readonly Dictionary<uint, FrozenActor> frozenActorsById;
|
||||
readonly SpatiallyPartitioned<uint> partitionedFrozenActorIds;
|
||||
readonly HashSet<uint> dirtyFrozenActorIds = new HashSet<uint>();
|
||||
readonly HashSet<uint> dirtyFrozenActorIds = new();
|
||||
|
||||
public FrozenActorLayer(Actor self, FrozenActorLayerInfo info)
|
||||
{
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace OpenRA.Traits
|
||||
readonly Map map;
|
||||
|
||||
// Individual shroud modifier sources (type and area)
|
||||
readonly Dictionary<object, ShroudSource> sources = new Dictionary<object, ShroudSource>();
|
||||
readonly Dictionary<object, ShroudSource> sources = new();
|
||||
|
||||
// Per-cell count of each source type, used to resolve the final cell type
|
||||
readonly ProjectedCellLayer<short> passiveVisibleCount;
|
||||
|
||||
@@ -563,7 +563,7 @@ namespace OpenRA.Traits
|
||||
|
||||
public class LobbyBooleanOption : LobbyOption
|
||||
{
|
||||
static readonly Dictionary<string, string> BoolValues = new Dictionary<string, string>()
|
||||
static readonly Dictionary<string, string> BoolValues = new()
|
||||
{
|
||||
{ true.ToString(), "Enabled" },
|
||||
{ false.ToString(), "Disabled" }
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace OpenRA.Traits
|
||||
public readonly string InternalName = null;
|
||||
|
||||
[Desc("Pick a random faction as the player's faction out of this list.")]
|
||||
public readonly HashSet<string> RandomFactionMembers = new HashSet<string>();
|
||||
public readonly HashSet<string> RandomFactionMembers = new();
|
||||
|
||||
[Desc("The side that the faction belongs to. For example, England belongs to the 'Allies' side.")]
|
||||
public readonly string Side = null;
|
||||
|
||||
@@ -47,15 +47,15 @@ namespace OpenRA.Traits
|
||||
readonly Func<Actor, ActorBoundsPair> selectActorAndBounds;
|
||||
readonly Cache<Player, SpatiallyPartitioned<FrozenActor>> partitionedMouseFrozenActors;
|
||||
readonly SpatiallyPartitioned<Actor> partitionedMouseActors;
|
||||
readonly Dictionary<Actor, ActorBoundsPair> partitionedMouseActorBounds = new Dictionary<Actor, ActorBoundsPair>();
|
||||
readonly Dictionary<Actor, ActorBoundsPair> partitionedMouseActorBounds = new();
|
||||
|
||||
readonly Cache<Player, SpatiallyPartitioned<FrozenActor>> partitionedRenderableFrozenActors;
|
||||
readonly SpatiallyPartitioned<Actor> partitionedRenderableActors;
|
||||
readonly SpatiallyPartitioned<IEffect> partitionedRenderableEffects;
|
||||
|
||||
// Updates are done in one pass to ensure all bound changes have been applied
|
||||
readonly HashSet<Actor> addOrUpdateActors = new HashSet<Actor>();
|
||||
readonly HashSet<Actor> removeActors = new HashSet<Actor>();
|
||||
readonly HashSet<Actor> addOrUpdateActors = new();
|
||||
readonly HashSet<Actor> removeActors = new();
|
||||
readonly Cache<Player, HashSet<FrozenActor>> addOrUpdateFrozenActors;
|
||||
readonly Cache<Player, HashSet<FrozenActor>> removeFrozenActors;
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ namespace OpenRA.Traits
|
||||
[TraitLocation(SystemActors.World)]
|
||||
public class ScreenShakerInfo : TraitInfo
|
||||
{
|
||||
public readonly float2 MinMultiplier = new float2(-3, -3);
|
||||
public readonly float2 MaxMultiplier = new float2(3, 3);
|
||||
public readonly float2 MinMultiplier = new(-3, -3);
|
||||
public readonly float2 MaxMultiplier = new(3, 3);
|
||||
|
||||
public override object Create(ActorInitializer init) { return new ScreenShaker(this); }
|
||||
}
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Traits
|
||||
{
|
||||
readonly ScreenShakerInfo info;
|
||||
WorldRenderer worldRenderer;
|
||||
readonly List<ShakeEffect> shakeEffects = new List<ShakeEffect>();
|
||||
readonly List<ShakeEffect> shakeEffects = new();
|
||||
int ticks = 0;
|
||||
|
||||
public ScreenShaker(ScreenShakerInfo info)
|
||||
|
||||
Reference in New Issue
Block a user