Add missing PlayNotification calls to SelectTarget.
This commit is contained in:
@@ -50,7 +50,6 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
public override void SelectTarget(Actor self, string order, SupportPowerManager manager)
|
||||
{
|
||||
Game.Sound.PlayToPlayer(SoundType.UI, manager.Self.Owner, Info.SelectTargetSound);
|
||||
self.World.OrderGenerator = new SelectAttackPowerTarget(self, order, manager, info.Cursor, MouseButton.Left, attack);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,6 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
public override void SelectTarget(Actor self, string order, SupportPowerManager manager)
|
||||
{
|
||||
Game.Sound.PlayToPlayer(SoundType.UI, manager.Self.Owner, Info.SelectTargetSound);
|
||||
self.World.OrderGenerator = new SelectChronoshiftTarget(Self.World, order, manager, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,13 +64,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public override void SelectTarget(Actor self, string order, SupportPowerManager manager)
|
||||
{
|
||||
if (info.UseDirectionalTarget)
|
||||
{
|
||||
Game.Sound.PlayToPlayer(SoundType.UI, manager.Self.Owner, Info.SelectTargetSound);
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech",
|
||||
Info.SelectTargetSpeechNotification, self.Owner.Faction.InternalName);
|
||||
|
||||
self.World.OrderGenerator = new SelectDirectionalTarget(self.World, order, manager, Info.Cursor, info.DirectionArrowAnimation, info.DirectionArrowPalette);
|
||||
}
|
||||
else
|
||||
base.SelectTarget(self, order, manager);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public override void SelectTarget(Actor self, string order, SupportPowerManager manager)
|
||||
{
|
||||
Game.Sound.PlayToPlayer(SoundType.World, manager.Self.Owner, Info.SelectTargetSound);
|
||||
self.World.OrderGenerator = new SelectConditionTarget(Self.World, order, manager, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -211,9 +211,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public override void SelectTarget(Actor self, string order, SupportPowerManager manager)
|
||||
{
|
||||
Game.Sound.PlayToPlayer(SoundType.UI, manager.Self.Owner, Info.SelectTargetSound);
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech",
|
||||
Info.SelectTargetSpeechNotification, self.Owner.Faction.InternalName);
|
||||
self.World.OrderGenerator = new SelectNukePowerTarget(order, manager, info, MouseButton.Left);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,13 +78,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public override void SelectTarget(Actor self, string order, SupportPowerManager manager)
|
||||
{
|
||||
if (info.UseDirectionalTarget)
|
||||
{
|
||||
Game.Sound.PlayToPlayer(SoundType.UI, manager.Self.Owner, Info.SelectTargetSound);
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech",
|
||||
Info.SelectTargetSpeechNotification, self.Owner.Faction.InternalName);
|
||||
|
||||
self.World.OrderGenerator = new SelectDirectionalTarget(self.World, order, manager, Info.Cursor, info.DirectionArrowAnimation, info.DirectionArrowPalette);
|
||||
}
|
||||
else
|
||||
base.SelectTarget(self, order, manager);
|
||||
}
|
||||
|
||||
@@ -160,9 +160,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public virtual void SelectTarget(Actor self, string order, SupportPowerManager manager)
|
||||
{
|
||||
Game.Sound.PlayToPlayer(SoundType.UI, manager.Self.Owner, Info.SelectTargetSound);
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech",
|
||||
Info.SelectTargetSpeechNotification, self.Owner.Faction.InternalName);
|
||||
self.World.OrderGenerator = new SelectGenericPowerTarget(order, manager, info.Cursor, MouseButton.Left);
|
||||
}
|
||||
|
||||
|
||||
@@ -228,7 +228,14 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
var power = Instances.FirstOrDefault(i => !i.IsTraitPaused);
|
||||
|
||||
power?.SelectTarget(power.Self, Key, Manager);
|
||||
if (power == null)
|
||||
return;
|
||||
|
||||
Game.Sound.PlayToPlayer(SoundType.UI, Manager.Self.Owner, Info.SelectTargetSound);
|
||||
Game.Sound.PlayNotification(power.Self.World.Map.Rules, power.Self.Owner, "Speech",
|
||||
Info.SelectTargetSpeechNotification, power.Self.Owner.Faction.InternalName);
|
||||
|
||||
power.SelectTarget(power.Self, Key, Manager);
|
||||
}
|
||||
|
||||
public virtual void Activate(Order order)
|
||||
|
||||
Reference in New Issue
Block a user