Expose Plane turn-to-attack delay to yaml.

Require Plane in some ctors.
This commit is contained in:
Taryn Hill
2015-04-01 00:12:20 -05:00
parent c0c7ad1035
commit 02da41e5c5
13 changed files with 60 additions and 45 deletions

View File

@@ -25,14 +25,14 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Fly within the cell grid.")]
public void Move(CPos cell)
{
Self.QueueActivity(new Fly(Self, Target.FromCell(Self.World, cell)));
Self.QueueActivity(new Fly(Self, Target.FromCell(Self.World, cell), Self.Trait<Plane>()));
}
[ScriptActorPropertyActivity]
[Desc("Return to the base, which is either the airfield given, or an auto-selected one otherwise.")]
public void ReturnToBase(Actor airfield = null)
{
Self.QueueActivity(new ReturnToBase(Self, airfield));
Self.QueueActivity(new ReturnToBase(Self, airfield, Self.Trait<Plane>()));
}
}
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Fly an attack against the target actor.")]
public void Attack(Actor target)
{
Self.QueueActivity(new FlyAttack(Self, Target.FromActor(target)));
Self.QueueActivity(new FlyAttack(Self, Target.FromActor(target), Self.Trait<Plane>()));
}
}
}