Add SpeechNotifications for InsufficientPower and Launch on support powers

This commit is contained in:
abcdefg30
2016-07-02 15:41:49 +02:00
parent 7fd7d44e7f
commit 6de12fb0e9
6 changed files with 22 additions and 6 deletions

View File

@@ -127,10 +127,11 @@ namespace OpenRA.Mods.Common.Traits
self.World.AddFrameEndTask(w =>
{
var notification = self.Owner.IsAlliedWith(self.World.RenderPlayer) ? Info.LaunchSound : Info.IncomingSound;
Game.Sound.Play(notification);
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech",
Info.IncomingSpeechNotification, self.Owner.Faction.InternalName);
var isAllied = self.Owner.IsAlliedWith(self.World.RenderPlayer);
Game.Sound.Play(isAllied ? Info.LaunchSound : Info.IncomingSound);
var speech = isAllied ? Info.LaunchSpeechNotification : Info.IncomingSpeechNotification;
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", speech, self.Owner.Faction.InternalName);
Actor distanceTestActor = null;
for (var i = -info.SquadSize / 2; i <= info.SquadSize / 2; i++)