Improve customisation of support power targeting.
This commit is contained in:
@@ -81,6 +81,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Game.Sound.PlayToPlayer(self.Owner, Info.EndChargeSound);
|
||||
}
|
||||
|
||||
public virtual void SelectTarget(Actor self, string order, SupportPowerManager manager)
|
||||
{
|
||||
Game.Sound.PlayToPlayer(manager.Self.Owner, Info.SelectTargetSound);
|
||||
self.World.OrderGenerator = new SelectGenericPowerTarget(order, manager, info.Cursor, MouseButton.Left);
|
||||
}
|
||||
|
||||
public virtual void Activate(Actor self, Order order, SupportPowerManager manager)
|
||||
{
|
||||
if (Info.DisplayRadarPing && manager.RadarPings != null)
|
||||
@@ -92,11 +98,5 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Info.RadarPingDuration);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual IOrderGenerator OrderGenerator(string order, SupportPowerManager manager)
|
||||
{
|
||||
Game.Sound.PlayToPlayer(manager.Self.Owner, Info.SelectTargetSound);
|
||||
return new SelectGenericPowerTarget(order, manager, info.Cursor, MouseButton.Left);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user