Fix StyleCop warnings in OpenRA.Mods.RA

This commit is contained in:
Hellhake
2015-01-01 23:03:55 +01:00
parent e9989496c4
commit b6410bc1e0
134 changed files with 261 additions and 267 deletions

View File

@@ -24,7 +24,7 @@ namespace OpenRA.Mods.RA.Traits
public readonly int Duration = 30;
public readonly bool KillCargo = true;
public override object Create(ActorInitializer init) { return new ChronoshiftPower(init.self,this); }
public override object Create(ActorInitializer init) { return new ChronoshiftPower(init.self, this); }
}
class ChronoshiftPower : SupportPower
@@ -255,19 +255,21 @@ namespace OpenRA.Mods.RA.Traits
foreach (var unit in power.UnitsInRange(sourceLocation))
{
var targetCell = unit.Location + (xy - sourceLocation);
if (manager.self.Owner.Shroud.IsExplored(targetCell) && unit.Trait<Chronoshiftable>().CanChronoshiftTo(unit,targetCell))
if (manager.self.Owner.Shroud.IsExplored(targetCell) && unit.Trait<Chronoshiftable>().CanChronoshiftTo(unit, targetCell))
{
canTeleport = true;
break;
}
}
if (!canTeleport)
{
// Check the terrain types. This will allow chronoshifts to occur on empty terrain to terrain of
// a similar type. This also keeps the cursor from changing in non-visible property, alerting the
// chronoshifter of enemy unit presence
canTeleport = power.SimilarTerrain(sourceLocation,xy);
canTeleport = power.SimilarTerrain(sourceLocation, xy);
}
return canTeleport;
}