Formatted all files.

Automatically formatted all files via VS. This generally corrects indentation, removes trailing whitespace and corrects misplaced tabs or spaces. Manually tweaked a few files where required.
This commit is contained in:
RoosterDragon
2015-01-04 22:09:32 +00:00
parent 6468c0b6e6
commit a6cda967c2
153 changed files with 740 additions and 698 deletions

View File

@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Traits
{
var t = init.Actor.Traits.WithInterface<TurretedInfo>()
.FirstOrDefault();
// Show the correct turret facing
var anim = new Animation(init.World, image, () => t.InitialFacing);
anim.PlayRepeating("idle");

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Custom palette name")]
public readonly string Palette = "effect";
public object Create(ActorInitializer init) { return new WithBuildingExplosion(this); }
}

View File

@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Traits
this.info = info;
renderSimple = self.Trait<RenderSimple>();
}
public void BuildingPlaced(Actor self)
{
renderSimple.PlayCustomAnim(self, info.Sequence);

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Traits
var building = self.Trait<Building>();
if (!building.SkipMakeAnimation)
{
renderBuilding.PlayCustomAnimThen(self, info.Sequence, () =>
renderBuilding.PlayCustomAnimThen(self, info.Sequence, () =>
{
building.NotifyBuildingComplete(self);
});

View File

@@ -38,9 +38,10 @@ namespace OpenRA.Mods.Common.Traits
anim = new Animation(self.World, rs.GetImage(self));
anim.PlayFetchIndex(info.Sequence,
() => playerResources.ResourceCapacity != 0
? ((10 * anim.CurrentSequence.Length - 1) * playerResources.Resources) / (10 * playerResources.ResourceCapacity)
: 0);
() =>
playerResources.ResourceCapacity != 0 ?
((10 * anim.CurrentSequence.Length - 1) * playerResources.Resources) / (10 * playerResources.ResourceCapacity) :
0);
rs.Add("resources_{0}".F(info.Sequence), new AnimationWithOffset(
anim, null, () => !buildComplete, 1024));