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

@@ -25,7 +25,7 @@ namespace OpenRA.Mods.D2k.Traits
public readonly string WormAttackNotification = "WormAttack";
public override object Create(ActorInitializer init) { return new AttackSwallow(init.self, this); }
public override object Create(ActorInitializer init) { return new AttackSwallow(init.Self, this); }
}
class AttackSwallow : AttackFrontal

View File

@@ -23,7 +23,7 @@ namespace OpenRA.Mods.D2k.Traits
[Desc("Automatically transports harvesters with the Carryable trait between resource fields and refineries")]
public class AutoCarryallInfo : ITraitInfo, Requires<IBodyOrientationInfo>
{
public object Create(ActorInitializer init) { return new AutoCarryall(init.self, this); }
public object Create(ActorInitializer init) { return new AutoCarryall(init.Self, this); }
}
public class AutoCarryall : INotifyBecomingIdle, INotifyKilled, ISync, IRender

View File

@@ -22,7 +22,7 @@ namespace OpenRA.Mods.D2k.Traits
public readonly string[] SafeTerrain = { "Concrete" };
public readonly int DamageThreshold = 50;
public object Create(ActorInitializer init) { return new DamagedWithoutFoundation(init.self, this); }
public object Create(ActorInitializer init) { return new DamagedWithoutFoundation(init.Self, this); }
}
class DamagedWithoutFoundation : ITick, ISync, INotifyAddedToWorld

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Mods.D2k.Traits
[Desc("Offset relative to the actor TopLeft. Not used if the template is PickAny")]
public readonly CVec Offset = CVec.Zero;
public object Create(ActorInitializer init) { return new LaysTerrain(init.self, this); }
public object Create(ActorInitializer init) { return new LaysTerrain(init.Self, this); }
}
public class LaysTerrain : INotifyAddedToWorld

View File

@@ -22,7 +22,7 @@ namespace OpenRA.Mods.D2k.Traits
[Desc("Required distance away from destination before requesting a pickup.")]
public int MinDistance = 6;
public object Create(ActorInitializer init) { return new Carryable(init.self, this); }
public object Create(ActorInitializer init) { return new Carryable(init.Self, this); }
}
public class Carryable : IDisableMove, INotifyHarvesterAction

View File

@@ -43,9 +43,9 @@ namespace OpenRA.Mods.D2k.Traits
{
this.info = info;
renderSprites = init.self.Trait<RenderSprites>();
renderSprites = init.Self.Trait<RenderSprites>();
overlay = new Animation(init.world, renderSprites.GetImage(init.self));
overlay = new Animation(init.World, renderSprites.GetImage(init.Self));
var key = "attack_overlay_{0}".F(info.Sequence);
renderSprites.Add(key, new AnimationWithOffset(overlay, null, () => !attacking),

View File

@@ -30,7 +30,7 @@ namespace OpenRA.Mods.D2k.Traits
[Desc("Custom palette is a player palette BaseName")]
public readonly bool IsPlayerPalette = false;
public object Create(ActorInitializer init) { return new WithBuildingPlacedOverlay(init.self, this); }
public object Create(ActorInitializer init) { return new WithBuildingPlacedOverlay(init.Self, this); }
}
public class WithBuildingPlacedOverlay : INotifyBuildComplete, INotifySold, INotifyDamageStateChanged, INotifyBuildingPlaced

View File

@@ -40,12 +40,12 @@ namespace OpenRA.Mods.D2k.Traits
return;
var key = "make_overlay_{0}".F(info.Sequence);
var rs = init.self.Trait<RenderSprites>();
var rs = init.Self.Trait<RenderSprites>();
var overlay = new Animation(init.world, rs.GetImage(init.self));
var overlay = new Animation(init.World, rs.GetImage(init.Self));
// Remove the animation once it is complete
overlay.PlayThen(info.Sequence, () => init.world.AddFrameEndTask(w => rs.Remove(key)));
overlay.PlayThen(info.Sequence, () => init.World.AddFrameEndTask(w => rs.Remove(key)));
rs.Add(key, new AnimationWithOffset(overlay, null, () => !buildComplete),
info.Palette, info.IsPlayerPalette);

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Mods.D2k.Traits
[Desc("Custom palette is a player palette BaseName")]
public readonly bool IsPlayerPalette = false;
public object Create(ActorInitializer init) { return new WithDeliveryOverlay(init.self, this); }
public object Create(ActorInitializer init) { return new WithDeliveryOverlay(init.Self, this); }
}
public class WithDeliveryOverlay : INotifyBuildComplete, INotifySold, INotifyDelivery

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Mods.D2k.Traits
[Desc("Custom palette is a player palette BaseName")]
public readonly bool IsPlayerPalette = false;
public object Create(ActorInitializer init) { return new WithDockingOverlay(init.self, this); }
public object Create(ActorInitializer init) { return new WithDockingOverlay(init.Self, this); }
}
public class WithDockingOverlay : INotifyDocking, INotifyBuildComplete, INotifySold

View File

@@ -34,7 +34,7 @@ namespace OpenRA.Mods.D2k.Traits
[Desc("Custom palette is a player palette BaseName")]
public readonly bool IsPlayerPalette = false;
public object Create(ActorInitializer init) { return new WithProductionOverlay(init.self, this); }
public object Create(ActorInitializer init) { return new WithProductionOverlay(init.Self, this); }
}
public class WithProductionOverlay : INotifyDamageStateChanged, ITick, INotifyBuildComplete, INotifySold

View File

@@ -19,7 +19,7 @@ namespace OpenRA.Mods.D2k.Traits
{
public readonly Color BarColor = Color.Orange;
public object Create(ActorInitializer init) { return new TemporaryOwnerManager(init.self, this); }
public object Create(ActorInitializer init) { return new TemporaryOwnerManager(init.Self, this); }
}
public class TemporaryOwnerManager : ISelectionBar, ITick, ISync, INotifyOwnerChanged

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.D2k.Traits
// Terrain tiles define their origin at the topleft
var s = theater.TileSprite(tile);
dirty[cell] = new Sprite(s.sheet, s.bounds, float2.Zero, s.channel, s.blendMode);
dirty[cell] = new Sprite(s.Sheet, s.Bounds, float2.Zero, s.Channel, s.BlendMode);
}
public void TickRender(WorldRenderer wr, Actor self)
@@ -67,10 +67,10 @@ namespace OpenRA.Mods.D2k.Traits
if (!wr.Viewport.VisibleCells.Contains(kv.Key))
continue;
if (wr.world.ShroudObscures(kv.Key))
if (wr.World.ShroudObscures(kv.Key))
continue;
new SpriteRenderable(kv.Value, wr.world.Map.CenterOfCell(kv.Key),
new SpriteRenderable(kv.Value, wr.World.Map.CenterOfCell(kv.Key),
WVec.Zero, -511, pal, 1f, true).Render(wr);
}
}

View File

@@ -33,7 +33,7 @@ namespace OpenRA.Mods.D2k.Traits
public ChooseBuildTabOnSelect(ActorInitializer init, ChooseBuildTabOnSelectInfo info)
{
world = init.world;
world = init.World;
this.info = info;
}

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.D2k.Traits
public readonly string WormSignature = "sandworm";
public readonly string WormOwnerPlayer = "Creeps";
public object Create(ActorInitializer init) { return new WormManager(this, init.self); }
public object Create(ActorInitializer init) { return new WormManager(this, init.Self); }
}
class WormManager : ITick