StyleCop clean OpenRA.Game

This commit is contained in:
Matthias Mailänder
2015-01-04 11:56:13 +01:00
parent d2d715765c
commit bc3acfeee7
345 changed files with 835 additions and 833 deletions

View File

@@ -40,7 +40,7 @@ namespace OpenRA.Traits
return new WRot(WAngle.Zero, WAngle.Zero, WAngle.FromFacing(facing));
}
public object Create(ActorInitializer init) { return new BodyOrientation(init.self, this); }
public object Create(ActorInitializer init) { return new BodyOrientation(init.Self, this); }
}
public class BodyOrientation : IBodyOrientation

View File

@@ -13,7 +13,7 @@ namespace OpenRA.Traits
[Desc("Checks for pause related desyncs. Attach this to the world actor.")]
public class DebugPauseStateInfo : ITraitInfo
{
public object Create(ActorInitializer init) { return new DebugPauseState(init.world); }
public object Create(ActorInitializer init) { return new DebugPauseState(init.World); }
}
public class DebugPauseState : ISync

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Traits
{
public readonly int Ticks = 60;
public virtual object Create(ActorInitializer init) { return new DrawLineToTarget(init.self, this); }
public virtual object Create(ActorInitializer init) { return new DrawLineToTarget(init.Self, this); }
}
public class DrawLineToTarget : IPostRenderSelection, INotifySelected, INotifyBecomingIdle

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Traits
[Desc("Required for FrozenUnderFog to work. Attach this to the player actor.")]
public class FrozenActorLayerInfo : ITraitInfo
{
public object Create(ActorInitializer init) { return new FrozenActorLayer(init.self); }
public object Create(ActorInitializer init) { return new FrozenActorLayer(init.Self); }
}
public class FrozenActor

View File

@@ -26,7 +26,7 @@ namespace OpenRA.Traits
[Desc("Allow palette modifiers to change the palette.")]
public readonly bool AllowModifiers = true;
public object Create(ActorInitializer init) { return new PlayerColorPalette(init.self.Owner, this); }
public object Create(ActorInitializer init) { return new PlayerColorPalette(init.Self.Owner, this); }
}
public class PlayerColorPalette : ILoadsPalettes

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Traits
[Desc("The prefix for the resulting player palettes")]
public readonly string BaseName = "highlight";
public object Create(ActorInitializer init) { return new PlayerHighlightPalette(init.self.Owner, this); }
public object Create(ActorInitializer init) { return new PlayerHighlightPalette(init.Self.Owner, this); }
}
public class PlayerHighlightPalette : ILoadsPalettes

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Traits
public readonly int DefaultCash = 5000;
public readonly int AdviceInterval = 250;
public object Create(ActorInitializer init) { return new PlayerResources(init.self, this); }
public object Create(ActorInitializer init) { return new PlayerResources(init.Self, this); }
}
public class PlayerResources : ITick, ISync

View File

@@ -22,7 +22,7 @@ namespace OpenRA.Traits
public readonly int[] Bounds = null;
[VoiceReference] public readonly string Voice = null;
public object Create(ActorInitializer init) { return new Selectable(init.self, this); }
public object Create(ActorInitializer init) { return new Selectable(init.Self, this); }
}
public class Selectable : IPostRenderSelection

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Traits
{
public readonly string Palette = "chrome";
public object Create(ActorInitializer init) { return new SelectionDecorations(init.self, this); }
public object Create(ActorInitializer init) { return new SelectionDecorations(init.Self, this); }
}
public class SelectionDecorations : IPostRenderSelection
@@ -68,7 +68,7 @@ namespace OpenRA.Traits
pipImages.PlayFetchIndex("groups", () => (int)group);
pipImages.Tick();
var pos = basePosition - (0.5f * pipImages.Image.size).ToInt2() + new int2(9, 5);
var pos = basePosition - (0.5f * pipImages.Image.Size).ToInt2() + new int2(9, 5);
yield return new UISpriteRenderable(pipImages.Image, pos, 0, pal, 1f);
}
@@ -81,7 +81,7 @@ namespace OpenRA.Traits
var pipImages = new Animation(self.World, "pips");
pipImages.PlayRepeating(PipStrings[0]);
var pipSize = pipImages.Image.size.ToInt2();
var pipSize = pipImages.Image.Size.ToInt2();
var pipxyBase = basePosition + new int2(1 - pipSize.X / 2, -(3 + pipSize.Y / 2));
var pipxyOffset = new int2(0, 0);
var pal = wr.Palette(Info.Palette);
@@ -127,7 +127,7 @@ namespace OpenRA.Traits
continue;
tagImages.PlayRepeating(TagStrings[(int)tag]);
var pos = basePosition + tagxyOffset - (0.5f * tagImages.Image.size).ToInt2();
var pos = basePosition + tagxyOffset - (0.5f * tagImages.Image.Size).ToInt2();
yield return new UISpriteRenderable(tagImages.Image, pos, 0, pal, 1f);
// Increment row

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Traits
[Desc("Size of partition bins (cells)")]
public readonly int BinSize = 10;
public object Create(ActorInitializer init) { return new ActorMap(init.world, this); }
public object Create(ActorInitializer init) { return new ActorMap(init.World, this); }
}
public class ActorMap : ITick

View File

@@ -34,7 +34,7 @@ namespace OpenRA.Traits
public PipType PipColor = PipType.Yellow;
public object Create(ActorInitializer init) { return new ResourceType(this, init.world); }
public object Create(ActorInitializer init) { return new ResourceType(this, init.World); }
}
public class ResourceType : IWorldLoaded

4
OpenRA.Game/Traits/World/ScreenMap.cs Executable file → Normal file
View File

@@ -22,7 +22,7 @@ namespace OpenRA.Traits
[Desc("Size of partition bins (world pixels)")]
public readonly int BinSize = 250;
public object Create(ActorInitializer init) { return new ScreenMap(init.world, this); }
public object Create(ActorInitializer init) { return new ScreenMap(init.World, this); }
}
public class ScreenMap : IWorldLoaded
@@ -36,7 +36,7 @@ namespace OpenRA.Traits
public ScreenMap(World world, ScreenMapInfo info)
{
this.info = info;
var ts = Game.modData.Manifest.TileSize;
var ts = Game.ModData.Manifest.TileSize;
cols = world.Map.MapSize.X * ts.Width / info.BinSize + 1;
rows = world.Map.MapSize.Y * ts.Height / info.BinSize + 1;

View File

@@ -17,7 +17,7 @@ namespace OpenRA.Traits
[Desc("Required for shroud and fog visibility checks. Add this to the player actor.")]
public class ShroudInfo : ITraitInfo
{
public object Create(ActorInitializer init) { return new Shroud(init.self); }
public object Create(ActorInitializer init) { return new Shroud(init.Self); }
}
public class Shroud