Unhardcode voice/order interaction; reimplement for move and attack

This commit is contained in:
Paul Chote
2010-07-23 18:40:39 +12:00
parent 1186d40fda
commit 55e59e0b53
8 changed files with 57 additions and 23 deletions

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.RA
public virtual object Create(ActorInitializer init) { return new AttackBase(init.self); }
}
public class AttackBase : IIssueOrder, IResolveOrder, ITick, IExplodeModifier, IOrderCursor
public class AttackBase : IIssueOrder, IResolveOrder, ITick, IExplodeModifier, IOrderCursor, IOrderVoice
{
public Target target;
@@ -263,6 +263,11 @@ namespace OpenRA.Mods.RA
}
}
public string VoicePhraseForOrder(Actor self, Order order)
{
return (order.OrderString == "Attack" || order.OrderString == "Heal") ? "Attack" : null;
}
protected virtual void QueueAttack(Actor self, Order order)
{
/* todo: choose the appropriate weapon, when only one works against this target */