Add WAngle-compatible airstrike/paratrooper APIs.

This commit is contained in:
Paul Chote
2020-06-10 21:05:12 +01:00
committed by reaperrr
parent a98e460257
commit 27602a4a97
4 changed files with 68 additions and 30 deletions

View File

@@ -28,10 +28,18 @@ namespace OpenRA.Mods.Common.Scripting
}
[Desc("Activate the actor's Paratroopers Power. Returns the aircraft that will drop the reinforcements.")]
public Actor[] ActivateParatroopers(WPos target, int facing = -1)
public Actor[] TargetParatroopers(WPos target, WAngle? facing = null)
{
var actors = pp.SendParatroopers(Self, target, facing);
return actors.First;
}
[Desc("Activate the actor's Paratroopers Power. Returns the aircraft that will drop the reinforcements. DEPRECATED! Will be removed.")]
public Actor[] ActivateParatroopers(WPos target, int facing = -1)
{
Game.Debug("SendParatroopersFrom is deprecated. Use TargetParatroopers instead.");
var actors = pp.SendParatroopers(Self, target, facing == -1 ? (WAngle?)null : WAngle.FromFacing(facing));
return actors.First;
}
}
}