Fix CA1854
This commit is contained in:
@@ -79,9 +79,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
// If we have recently tried and failed to find a use location for a power, then do not try again until later
|
||||
var isDelayed = waitingPowers[sp] > 0;
|
||||
if (sp.Ready && !isDelayed && powerDecisions.ContainsKey(sp.Info.OrderName))
|
||||
if (sp.Ready && !isDelayed && powerDecisions.TryGetValue(sp.Info.OrderName, out var powerDecision))
|
||||
{
|
||||
var powerDecision = powerDecisions[sp.Info.OrderName];
|
||||
if (powerDecision == null)
|
||||
{
|
||||
AIUtils.BotDebug("{0} couldn't find powerDecision for {1}", player.PlayerName, sp.Info.OrderName);
|
||||
|
||||
Reference in New Issue
Block a user