Added a lua function for paratroopers
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
using System.Linq;
|
||||
using OpenRA.Mods.Common.Activities;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Mods.RA.Traits;
|
||||
using OpenRA.Scripting;
|
||||
using OpenRA.Traits;
|
||||
|
||||
@@ -65,4 +66,22 @@ namespace OpenRA.Mods.RA.Scripting
|
||||
Self.QueueActivity(new RemoveSelf());
|
||||
}
|
||||
}
|
||||
|
||||
[ScriptGlobal("Air Support Powers")]
|
||||
public class ParatroopersProperties : ScriptActorProperties, Requires<ParatroopersPowerInfo>
|
||||
{
|
||||
readonly ParatroopersPower pp;
|
||||
|
||||
public ParatroopersProperties(ScriptContext context, Actor self)
|
||||
: base(context, self)
|
||||
{
|
||||
pp = self.TraitsImplementing<ParatroopersPower>().First();
|
||||
}
|
||||
|
||||
[Desc("Activate the actor's Paratroopers Power. Returns the dropped units.")]
|
||||
public Actor[] SendParatroopers(WPos target, bool randomize = true, int facing = 0)
|
||||
{
|
||||
return pp.SendParatroopers(Self, target, randomize, facing);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user