diff --git a/.editorconfig b/.editorconfig index fc93f280cd..3afbeaf1a5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -207,6 +207,9 @@ dotnet_diagnostic.IDE0075.severity = warning # Convert typeof to nameof. dotnet_diagnostic.IDE0082.severity = warning +# Remove unnecessary equality operator. +dotnet_diagnostic.IDE0100.severity = warning + # Naming rule violation. dotnet_diagnostic.IDE1006.severity = warning diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index 1bbd90112b..7ef2787de4 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -269,7 +269,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic { var bot = botTypes.Random(Game.CosmeticRandom); var c = orderManager.LobbyInfo.ClientInSlot(slot.Key); - if (slot.Value.AllowBots == true && (c == null || c.Bot != null)) + if (slot.Value.AllowBots && (c == null || c.Bot != null)) orderManager.IssueOrder(Order.Command($"slot_bot {slot.Key} {botController.Index} {bot}")); } }