Use support sequences for scripted powers
This commit is contained in:
committed by
Gustas Kažukauskas
parent
8833e95f21
commit
74ead504ec
@@ -30,6 +30,9 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[Desc("Activate the actor's Airstrike Power. Returns the aircraft that will attack.")]
|
||||
public Actor[] TargetAirstrike(WPos target, WAngle? facing = null)
|
||||
{
|
||||
foreach (var notify in Self.TraitsImplementing<INotifySupportPower>())
|
||||
notify.Activated(Self);
|
||||
|
||||
return ap.SendAirstrike(Self, target, facing);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,9 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
public void ActivateNukePower(CPos target)
|
||||
{
|
||||
np.Activate(Self, Self.World.Map.CenterOfCell(target));
|
||||
|
||||
foreach (var notify in Self.TraitsImplementing<INotifySupportPower>())
|
||||
notify.Activated(Self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,9 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[Desc("Command transport to paradrop passengers near the target cell.")]
|
||||
public void Paradrop(CPos cell)
|
||||
{
|
||||
foreach (var notify in Self.TraitsImplementing<INotifySupportPower>())
|
||||
notify.Activated(Self);
|
||||
|
||||
paradrop.SetLZ(cell, true);
|
||||
Self.QueueActivity(new Fly(Self, Target.FromCell(Self.World, cell)));
|
||||
Self.QueueActivity(new FlyOffMap(Self));
|
||||
|
||||
@@ -30,6 +30,9 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[Desc("Activate the actor's Paratroopers Power. Returns the aircraft that will drop the reinforcements.")]
|
||||
public Actor[] TargetParatroopers(WPos target, WAngle? facing = null)
|
||||
{
|
||||
foreach (var notify in Self.TraitsImplementing<INotifySupportPower>())
|
||||
notify.Activated(Self);
|
||||
|
||||
var actors = pp.SendParatroopers(Self, target, facing);
|
||||
return actors.Aircraft;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user