Fix IDE0200
This commit is contained in:
committed by
Gustas Kažukauskas
parent
ce3ad6fbb3
commit
0338258b45
@@ -140,7 +140,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (minelayers.Length == 0)
|
||||
return;
|
||||
|
||||
var enemies = world.Actors.Where(a => IsPreferredEnemyUnit(a)).ToArray();
|
||||
var enemies = world.Actors.Where(IsPreferredEnemyUnit).ToArray();
|
||||
if (enemies.Length == 0)
|
||||
return;
|
||||
|
||||
|
||||
@@ -553,14 +553,14 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
unitsHangingAroundTheBase.Clear();
|
||||
unitsHangingAroundTheBase.AddRange(FieldLoader.GetValue<uint[]>("UnitsHangingAroundTheBase", unitsHangingAroundTheBaseNode.Value)
|
||||
.Select(a => self.World.GetActorById(a)).Where(a => a != null));
|
||||
.Select(self.World.GetActorById).Where(a => a != null));
|
||||
}
|
||||
|
||||
if (nodes.TryGetValue("ActiveUnits", out var activeUnitsNode))
|
||||
{
|
||||
activeUnits.Clear();
|
||||
activeUnits.UnionWith(FieldLoader.GetValue<uint[]>("ActiveUnits", activeUnitsNode.Value)
|
||||
.Select(a => self.World.GetActorById(a)).Where(a => a != null));
|
||||
.Select(self.World.GetActorById).Where(a => a != null));
|
||||
}
|
||||
|
||||
if (nodes.TryGetValue("RushTicks", out var rushTicksNode))
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
|
||||
var unitsNode = yaml.NodeWithKeyOrDefault("Units");
|
||||
if (unitsNode != null)
|
||||
squad.Units.UnionWith(FieldLoader.GetValue<uint[]>("Units", unitsNode.Value.Value)
|
||||
.Select(a => squadManager.World.GetActorById(a)));
|
||||
.Select(squadManager.World.GetActorById));
|
||||
|
||||
return squad;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user