Merge pull request #7246 from Hellhake/stylecop-ra

Fix StyleCop warnings in OpenRA.Mods.RA
This commit is contained in:
Matthias Mailänder
2015-01-02 16:38:22 +01:00
134 changed files with 261 additions and 267 deletions

View File

@@ -8,9 +8,9 @@
*/
#endregion
using System.Linq;
using System.Drawing;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Activities;
using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Orders;
@@ -72,9 +72,11 @@ namespace OpenRA.Mods.RA.Traits
if (info.ThumpDamageWeapon != null)
{
var weapon = self.World.Map.Rules.Weapons[info.ThumpDamageWeapon.ToLowerInvariant()];
// Use .FromPos since this weapon needs to affect more than just the MadTank actor
weapon.Impact(Target.FromPos(self.CenterPosition), self, Enumerable.Empty<int>());
}
screenShaker.AddEffect(info.ThumpShakeTime, self.CenterPosition, info.ThumpShakeIntensity, info.ThumpShakeMultiplier);
tick = 0;
}
@@ -112,9 +114,11 @@ namespace OpenRA.Mods.RA.Traits
if (info.DetonationWeapon != null)
{
var weapon = self.World.Map.Rules.Weapons[info.DetonationWeapon.ToLowerInvariant()];
// Use .FromPos since this actor is killed. Cannot use Target.FromActor
weapon.Impact(Target.FromPos(self.CenterPosition), self, Enumerable.Empty<int>());
}
self.Kill(self);
});
}
@@ -164,7 +168,6 @@ namespace OpenRA.Mods.RA.Traits
self.QueueActivity(new MoveAdjacentTo(self, target));
self.QueueActivity(new CallFunc(StartDetonationSequence));
}
else if (order.OrderString == "Detonate")
{
self.CancelActivity();