Fix IDE0090
This commit is contained in:
committed by
Pavel Penev
parent
164abfdae1
commit
8a285f9b19
@@ -430,7 +430,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
currentFrame = currentSprites.Length - 1;
|
||||
}
|
||||
|
||||
readonly Dictionary<string, bool> assetVisByName = new Dictionary<string, bool>();
|
||||
readonly Dictionary<string, bool> assetVisByName = new();
|
||||
|
||||
bool FilterAsset(string filename)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly BackgroundWidget actorEditPanel;
|
||||
readonly LabelWidget typeLabel;
|
||||
readonly TextFieldWidget actorIDField;
|
||||
readonly HashSet<TextFieldWidget> typableFields = new HashSet<TextFieldWidget>();
|
||||
readonly HashSet<TextFieldWidget> typableFields = new();
|
||||
readonly LabelWidget actorIDErrorLabel;
|
||||
|
||||
readonly Widget initContainer;
|
||||
@@ -505,7 +505,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
readonly EditorActorPreview actor;
|
||||
readonly SetActorIdAction setActorIdAction;
|
||||
readonly List<IEditActorHandle> handles = new List<IEditActorHandle>();
|
||||
readonly List<IEditActorHandle> handles = new();
|
||||
|
||||
public EditActorPreview(EditorActorPreview actor)
|
||||
{
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
protected readonly ScrollPanelWidget Panel;
|
||||
protected readonly ScrollItemWidget ItemTemplate;
|
||||
|
||||
protected readonly HashSet<string> SelectedCategories = new HashSet<string>();
|
||||
protected readonly List<string> FilteredCategories = new List<string>();
|
||||
protected readonly HashSet<string> SelectedCategories = new();
|
||||
protected readonly List<string> FilteredCategories = new();
|
||||
|
||||
protected string[] allCategories;
|
||||
protected string searchFilter;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly EditorActionManager editorActionManager;
|
||||
readonly ScrollItemWidget template;
|
||||
|
||||
readonly Dictionary<EditorActionContainer, ScrollItemWidget> states = new Dictionary<EditorActionContainer, ScrollItemWidget>();
|
||||
readonly Dictionary<EditorActionContainer, ScrollItemWidget> states = new();
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public HistoryLogLogic(Widget widget, World world)
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly Widget panel;
|
||||
readonly ScrollPanelWidget gameList;
|
||||
readonly TextFieldWidget saveTextField;
|
||||
readonly List<string> games = new List<string>();
|
||||
readonly List<string> games = new();
|
||||
readonly Action onStart;
|
||||
readonly Action onExit;
|
||||
readonly ModData modData;
|
||||
|
||||
@@ -46,9 +46,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly TextFieldWidget chatText;
|
||||
readonly CachedTransform<int, string> chatAvailableIn;
|
||||
readonly string chatDisabled;
|
||||
readonly Dictionary<TextNotificationPool, Widget> templates = new Dictionary<TextNotificationPool, Widget>();
|
||||
readonly Dictionary<TextNotificationPool, Widget> templates = new();
|
||||
|
||||
readonly TabCompletionLogic tabCompletion = new TabCompletionLogic();
|
||||
readonly TabCompletionLogic tabCompletion = new();
|
||||
|
||||
readonly string chatLineSound = ChromeMetrics.Get<string>("ChatLineSound");
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly Widget buttonContainer;
|
||||
readonly ButtonWidget buttonTemplate;
|
||||
readonly int2 buttonStride;
|
||||
readonly List<ButtonWidget> buttons = new List<ButtonWidget>();
|
||||
readonly List<ButtonWidget> buttons = new();
|
||||
|
||||
readonly ModData modData;
|
||||
readonly Action onExit;
|
||||
|
||||
@@ -45,8 +45,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly IOrderedEnumerable<IGrouping<int, CameraOption>> teams;
|
||||
readonly bool limitViews;
|
||||
|
||||
readonly HotkeyReference combinedViewKey = new HotkeyReference();
|
||||
readonly HotkeyReference worldViewKey = new HotkeyReference();
|
||||
readonly HotkeyReference combinedViewKey = new();
|
||||
readonly HotkeyReference worldViewKey = new();
|
||||
|
||||
readonly World world;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
enum PlaybackSpeed { Regular, Slow, Fast, Maximum }
|
||||
|
||||
readonly Dictionary<PlaybackSpeed, float> multipliers = new Dictionary<PlaybackSpeed, float>()
|
||||
readonly Dictionary<PlaybackSpeed, float> multipliers = new()
|
||||
{
|
||||
{ PlaybackSpeed.Regular, 1 },
|
||||
{ PlaybackSpeed.Slow, 2 },
|
||||
|
||||
@@ -28,8 +28,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly ScrollPanelWidget scrollPanel;
|
||||
readonly Widget template;
|
||||
|
||||
readonly Dictionary<string, ModContent.ModSource> sources = new Dictionary<string, ModContent.ModSource>();
|
||||
readonly Dictionary<string, ModContent.ModDownload> downloads = new Dictionary<string, ModContent.ModDownload>();
|
||||
readonly Dictionary<string, ModContent.ModSource> sources = new();
|
||||
readonly Dictionary<string, ModContent.ModDownload> downloads = new();
|
||||
|
||||
bool sourceAvailable;
|
||||
|
||||
|
||||
@@ -81,18 +81,18 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly Widget newSpectatorTemplate;
|
||||
|
||||
readonly ScrollPanelWidget lobbyChatPanel;
|
||||
readonly Dictionary<TextNotificationPool, Widget> chatTemplates = new Dictionary<TextNotificationPool, Widget>();
|
||||
readonly Dictionary<TextNotificationPool, Widget> chatTemplates = new();
|
||||
readonly TextFieldWidget chatTextField;
|
||||
readonly CachedTransform<int, string> chatAvailableIn;
|
||||
readonly string chatDisabled;
|
||||
|
||||
readonly ScrollPanelWidget players;
|
||||
|
||||
readonly Dictionary<string, LobbyFaction> factions = new Dictionary<string, LobbyFaction>();
|
||||
readonly Dictionary<string, LobbyFaction> factions = new();
|
||||
|
||||
readonly ColorPickerManagerInfo colorManager;
|
||||
|
||||
readonly TabCompletionLogic tabCompletion = new TabCompletionLogic();
|
||||
readonly TabCompletionLogic tabCompletion = new();
|
||||
|
||||
MapPreview map;
|
||||
Session.MapStatus mapStatus;
|
||||
@@ -103,7 +103,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
bool insufficientPlayerSpawns;
|
||||
bool teamChat;
|
||||
bool updateDiscordStatus = true;
|
||||
Dictionary<int, SpawnOccupant> spawnOccupants = new Dictionary<int, SpawnOccupant>();
|
||||
Dictionary<int, SpawnOccupant> spawnOccupants = new();
|
||||
|
||||
readonly string chatLineSound = ChromeMetrics.Get<string>("ChatLineSound");
|
||||
|
||||
|
||||
@@ -77,9 +77,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
MapClassification currentTab;
|
||||
|
||||
readonly Dictionary<MapClassification, ScrollPanelWidget> scrollpanels = new Dictionary<MapClassification, ScrollPanelWidget>();
|
||||
readonly Dictionary<MapClassification, ScrollPanelWidget> scrollpanels = new();
|
||||
|
||||
readonly Dictionary<MapClassification, MapPreview[]> tabMaps = new Dictionary<MapClassification, MapPreview[]>();
|
||||
readonly Dictionary<MapClassification, MapPreview[]> tabMaps = new();
|
||||
string[] visibleMaps;
|
||||
|
||||
string selectedUid;
|
||||
|
||||
@@ -103,13 +103,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
[TranslationReference]
|
||||
const string Defeat = "options-winstate.defeat";
|
||||
|
||||
static Filter filter = new Filter();
|
||||
static Filter filter = new();
|
||||
|
||||
readonly Widget panel;
|
||||
readonly ScrollPanelWidget replayList, playerList;
|
||||
readonly ScrollItemWidget playerTemplate, playerHeader;
|
||||
readonly List<ReplayMetadata> replays = new List<ReplayMetadata>();
|
||||
readonly Dictionary<ReplayMetadata, ReplayState> replayState = new Dictionary<ReplayMetadata, ReplayState>();
|
||||
readonly List<ReplayMetadata> replays = new();
|
||||
readonly Dictionary<ReplayMetadata, ReplayState> replayState = new();
|
||||
readonly Action onStart;
|
||||
readonly ModData modData;
|
||||
readonly WebServices services;
|
||||
|
||||
@@ -32,8 +32,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
bool isHotkeyDefault;
|
||||
|
||||
string currentContext = "Any";
|
||||
readonly HashSet<string> contexts = new HashSet<string>() { "Any" };
|
||||
readonly Dictionary<string, HashSet<string>> hotkeyGroups = new Dictionary<string, HashSet<string>>();
|
||||
readonly HashSet<string> contexts = new() { "Any" };
|
||||
readonly Dictionary<string, HashSet<string>> hotkeyGroups = new();
|
||||
TextFieldWidget filterInput;
|
||||
|
||||
Widget headerTemplate;
|
||||
|
||||
@@ -52,14 +52,14 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
[TranslationReference]
|
||||
const string ResetCancel = "dialog-settings-reset.cancel";
|
||||
|
||||
readonly Dictionary<string, Func<bool>> leavePanelActions = new Dictionary<string, Func<bool>>();
|
||||
readonly Dictionary<string, Action> resetPanelActions = new Dictionary<string, Action>();
|
||||
readonly Dictionary<string, Func<bool>> leavePanelActions = new();
|
||||
readonly Dictionary<string, Action> resetPanelActions = new();
|
||||
|
||||
readonly Widget panelContainer, tabContainer;
|
||||
readonly ButtonWidget tabTemplate;
|
||||
readonly int2 buttonStride;
|
||||
readonly List<ButtonWidget> buttons = new List<ButtonWidget>();
|
||||
readonly Dictionary<string, string> panels = new Dictionary<string, string>();
|
||||
readonly List<ButtonWidget> buttons = new();
|
||||
readonly Dictionary<string, string> panels = new();
|
||||
string activePanel;
|
||||
|
||||
bool needsRestart = false;
|
||||
|
||||
Reference in New Issue
Block a user