StyleCop clean OpenRA.Mods.RA

This commit is contained in:
Matthias Mailänder
2015-01-04 16:49:45 +01:00
parent 2691f16a81
commit 1b0e3a7a7f
39 changed files with 414 additions and 398 deletions

View File

@@ -22,7 +22,7 @@ namespace OpenRA.Mods.RA.Activities
public class Teleport : Activity
{
const int maxCellSearchRange = Map.MaxTilesInCircleRange;
const int MaxCellSearchRange = Map.MaxTilesInCircleRange;
Actor teleporter;
CPos destination;
int? maximumDistance;
@@ -32,8 +32,8 @@ namespace OpenRA.Mods.RA.Activities
public Teleport(Actor teleporter, CPos destination, int? maximumDistance, bool killCargo, bool screenFlash, string sound)
{
if (maximumDistance > maxCellSearchRange)
throw new InvalidOperationException("Teleport cannot be used with a maximum teleport distance greater than {0}.".F(maxCellSearchRange));
if (maximumDistance > MaxCellSearchRange)
throw new InvalidOperationException("Teleport cannot be used with a maximum teleport distance greater than {0}.".F(MaxCellSearchRange));
this.teleporter = teleporter;
this.destination = destination;
@@ -114,7 +114,7 @@ namespace OpenRA.Mods.RA.Activities
if (pos.CanEnterCell(destination) && teleporter.Owner.Shroud.IsExplored(destination))
return destination;
var max = maximumDistance != null ? maximumDistance.Value : maxCellSearchRange;
var max = maximumDistance != null ? maximumDistance.Value : MaxCellSearchRange;
foreach (var tile in self.World.Map.FindTilesInCircle(destination, max))
{
if (teleporter.Owner.Shroud.IsExplored(tile)