From d52313ab180a99bb05fee7e959246c25c20c97ef Mon Sep 17 00:00:00 2001 From: reaperrr Date: Wed, 7 Jun 2017 19:19:51 +0200 Subject: [PATCH] Rename WithAttackAnimation.BodyName to just .Body Shorter and more consistent with Armament.Turret, WithTurretedAttackAnimation.Turret, WithSpriteBarrel.Armament etc. --- OpenRA.Mods.Common/Traits/Render/WithAttackAnimation.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Render/WithAttackAnimation.cs b/OpenRA.Mods.Common/Traits/Render/WithAttackAnimation.cs index 0cdadea63e..3e16353140 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithAttackAnimation.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithAttackAnimation.cs @@ -35,13 +35,13 @@ namespace OpenRA.Mods.Common.Traits.Render public readonly AttackDelayType DelayRelativeTo = AttackDelayType.Preparation; [Desc("Which sprite body to modify.")] - public readonly string BodyName = "body"; + public readonly string Body = "body"; public override object Create(ActorInitializer init) { return new WithAttackAnimation(init, this); } public override void RulesetLoaded(Ruleset rules, ActorInfo ai) { - var matches = ai.TraitInfos().Count(w => BodyName == w.Name); + var matches = ai.TraitInfos().Count(w => Body == w.Name); if (matches != 1) throw new YamlException("WithAttackAnimation needs exactly one sprite body with matching name."); @@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Traits.Render attack = init.Self.Trait(); armament = init.Self.TraitsImplementing() .Single(a => a.Info.Name == Info.Armament); - wsb = init.Self.TraitsImplementing().First(w => w.Info.Name == Info.BodyName); + wsb = init.Self.TraitsImplementing().First(w => w.Info.Name == Info.Body); noAimOrReloadAnim = string.IsNullOrEmpty(Info.AimSequence) && string.IsNullOrEmpty(Info.ReloadPrefix); }