From de9ec12c8cb3cbeaa9d5821be1e2c5c7584b86d8 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sun, 16 May 2010 22:15:41 +1200 Subject: [PATCH] order names stuff to remove clashes in ra-nng --- OpenRA.Game/Traits/SupportPower.cs | 5 ++++- OpenRA.Mods.RA/AirstrikePower.cs | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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();