order names stuff to remove clashes in ra-nng

This commit is contained in:
Chris Forbes
2010-05-16 22:15:41 +12:00
parent 9d5eab74b1
commit de9ec12c8c
2 changed files with 6 additions and 3 deletions

View File

@@ -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

View File

@@ -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();