diff --git a/OpenRA.Game/Traits/SupportPower.cs b/OpenRA.Game/Traits/SupportPower.cs index cb49c4b53d..e0f6b781dd 100644 --- a/OpenRA.Game/Traits/SupportPower.cs +++ b/OpenRA.Game/Traits/SupportPower.cs @@ -33,14 +33,17 @@ namespace OpenRA.Traits public readonly string[] Prerequisites = { }; public readonly int TechLevel = -1; public readonly bool GivenAuto = true; + + public readonly string OrderName; public readonly string BeginChargeSound = null; public readonly string EndChargeSound = null; public readonly string SelectTargetSound = null; public readonly string LaunchSound = null; - public abstract object Create(Actor self); + + public SupportPowerInfo() { OrderName = GetType().Name + "Order"; } } public class SupportPower : ITick diff --git a/OpenRA.Mods.RA/AirstrikePower.cs b/OpenRA.Mods.RA/AirstrikePower.cs index ff45e33827..8970396794 100644 --- a/OpenRA.Mods.RA/AirstrikePower.cs +++ b/OpenRA.Mods.RA/AirstrikePower.cs @@ -37,14 +37,14 @@ namespace OpenRA.Mods.RA protected override void OnActivate() { - Game.controller.orderGenerator = new GenericSelectTarget(Owner.PlayerActor, "Airstrike", "ability"); + Game.controller.orderGenerator = new GenericSelectTarget(Owner.PlayerActor, Info.OrderName, "ability"); } public void ResolveOrder(Actor self, Order order) { if (!IsAvailable) return; - if (order.OrderString == "Airstrike") + if (order.OrderString == Info.OrderName) { var startPos = Owner.World.ChooseRandomEdgeCell();