Fix IDE0083
This commit is contained in:
committed by
Pavel Penev
parent
bd2b3d9793
commit
164abfdae1
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var disconnected = false;
|
||||
widget.Get<LogicTickerWidget>("DISCONNECT_WATCHER").OnTick = () =>
|
||||
{
|
||||
if (!(orderManager.Connection is NetworkConnection connection))
|
||||
if (orderManager.Connection is not NetworkConnection connection)
|
||||
return;
|
||||
|
||||
if (disconnected || connection.ConnectionState != ConnectionState.NotConnected)
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
foreach (var kv in modData.MapCache.MapLocations)
|
||||
{
|
||||
if (!(kv.Key is Folder folder))
|
||||
if (kv.Key is not Folder folder)
|
||||
continue;
|
||||
|
||||
try
|
||||
@@ -209,7 +209,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
try
|
||||
{
|
||||
if (!(map.Package is IReadWritePackage package) || package.Name != combinedPath)
|
||||
if (map.Package is not IReadWritePackage package || package.Name != combinedPath)
|
||||
{
|
||||
selectedDirectory.Folder.Delete(combinedPath);
|
||||
if (fileType == MapFileType.OraMap)
|
||||
|
||||
@@ -276,7 +276,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
games[games.IndexOf(oldPath)] = newPath;
|
||||
foreach (var c in gameList.Children)
|
||||
{
|
||||
if (!(c is ScrollItemWidget item) || item.ItemKey != oldPath)
|
||||
if (c is not ScrollItemWidget item || item.ItemKey != oldPath)
|
||||
continue;
|
||||
|
||||
item.ItemKey = newPath;
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
// Select the first active tab
|
||||
foreach (var b in typesContainer.Children)
|
||||
{
|
||||
if (!(b is ProductionTypeButtonWidget button) || button.IsDisabled())
|
||||
if (b is not ProductionTypeButtonWidget button || button.IsDisabled())
|
||||
continue;
|
||||
|
||||
button.OnClick();
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
forceAttackButton.IsDisabled = () => { UpdateStateIfNecessary(); return forceAttackDisabled; };
|
||||
forceAttackButton.IsHighlighted = () => !forceAttackButton.IsDisabled() && IsForceModifiersActive(Modifiers.Ctrl)
|
||||
&& !(world.OrderGenerator is AttackMoveOrderGenerator);
|
||||
&& world.OrderGenerator is not AttackMoveOrderGenerator;
|
||||
|
||||
forceAttackButton.OnClick = () =>
|
||||
{
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
};
|
||||
}
|
||||
|
||||
foreach (var option in allOptions.Where(o => !(o is LobbyBooleanOption)))
|
||||
foreach (var option in allOptions.Where(o => o is not LobbyBooleanOption))
|
||||
{
|
||||
if (dropdownColumns.Count == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user