Fix CA1310, CA1311
This commit is contained in:
committed by
Matthias Mailänder
parent
d83e579dfe
commit
285443f10f
@@ -150,7 +150,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (buildable != null)
|
||||
{
|
||||
var prerequisites = buildable.Prerequisites.Select(a => ActorName(modData.DefaultRules, a))
|
||||
.Where(s => !s.StartsWith("~", StringComparison.Ordinal) && !s.StartsWith("!", StringComparison.Ordinal));
|
||||
.Where(s => !s.StartsWith('~') && !s.StartsWith('!'));
|
||||
if (prerequisites.Any())
|
||||
text += $"Requires {prerequisites.JoinWith(", ")}\n\n";
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Mods.Common.Commands;
|
||||
@@ -143,7 +142,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var team = teamChat && !disableTeamChat;
|
||||
if (chatText.Text != "")
|
||||
{
|
||||
if (!chatText.Text.StartsWith("/", StringComparison.Ordinal))
|
||||
if (!chatText.Text.StartsWith('/'))
|
||||
{
|
||||
// This should never happen, but avoid a crash if it does somehow (chat will just stay open)
|
||||
if (!isObserver && orderManager.LocalClient == null && world.LocalPlayer == null)
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
}
|
||||
|
||||
var prereqs = buildable.Prerequisites.Select(a => ActorName(mapRules, a))
|
||||
.Where(s => !s.StartsWith("~", StringComparison.Ordinal) && !s.StartsWith("!", StringComparison.Ordinal));
|
||||
.Where(s => !s.StartsWith('~') && !s.StartsWith('!'));
|
||||
|
||||
var requiresSize = int2.Zero;
|
||||
if (prereqs.Any())
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
}
|
||||
|
||||
var toComplete = "";
|
||||
if (text.StartsWith("/") && Commands != null)
|
||||
if (text.StartsWith('/') && Commands != null)
|
||||
{
|
||||
prefix = "/";
|
||||
suffix = "";
|
||||
|
||||
Reference in New Issue
Block a user