diff --git a/OpenRA.Mods.Common/Traits/Repairable.cs b/OpenRA.Mods.Common/Traits/Repairable.cs index 403c6cebee..5f6d604644 100644 --- a/OpenRA.Mods.Common/Traits/Repairable.cs +++ b/OpenRA.Mods.Common/Traits/Repairable.cs @@ -20,7 +20,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { [Desc("This actor can be sent to a structure for repairs.")] - class RepairableInfo : ITraitInfo, Requires + class RepairableInfo : ITraitInfo, Requires, Requires { public readonly HashSet RepairBuildings = new HashSet { "fix" }; @@ -33,12 +33,14 @@ namespace OpenRA.Mods.Common.Traits { readonly RepairableInfo info; readonly Health health; + readonly IMove movement; readonly AmmoPool[] ammoPools; public Repairable(Actor self, RepairableInfo info) { this.info = info; health = self.Trait(); + movement = self.Trait(); ammoPools = self.TraitsImplementing().ToArray(); } @@ -90,7 +92,6 @@ namespace OpenRA.Mods.Common.Traits if (!CanRepairAt(order.TargetActor) || (!CanRepair() && !CanRearm())) return; - var movement = self.Trait(); var target = Target.FromOrder(self.World, order); self.SetTargetLine(target, Color.Green);