Unhardcode voice/order interaction; reimplement for move and attack
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user