Remove some misc redundancies
This commit is contained in:
@@ -64,7 +64,7 @@ namespace OpenRA.Traits
|
||||
return;
|
||||
|
||||
var pipSources = self.TraitsImplementing<IPips>();
|
||||
if (pipSources.Count() == 0)
|
||||
if (!pipSources.Any())
|
||||
return;
|
||||
|
||||
var pipImages = new Animation("pips");
|
||||
|
||||
@@ -32,14 +32,14 @@ namespace OpenRA.Traits
|
||||
public static Target FromOrder(Order o)
|
||||
{
|
||||
return o.TargetActor != null
|
||||
? Target.FromActor(o.TargetActor)
|
||||
: Target.FromCell(o.TargetLocation);
|
||||
? FromActor(o.TargetActor)
|
||||
: FromCell(o.TargetLocation);
|
||||
}
|
||||
|
||||
public static Target FromActor(Actor a)
|
||||
{
|
||||
if (a == null)
|
||||
return Target.Invalid;
|
||||
return Invalid;
|
||||
|
||||
return new Target
|
||||
{
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace OpenRA.Traits
|
||||
public static IEnumerable<CPos> AdjacentCells(Target target)
|
||||
{
|
||||
var cells = target.Positions.Select(p => p.ToCPos()).Distinct();
|
||||
return Util.ExpandFootprint(cells, true);
|
||||
return ExpandFootprint(cells, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user