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

@@ -114,7 +114,11 @@ namespace OpenRA.Mods.Common.Widgets
protected void ClickIcon(SupportPowerIcon clicked)
{
if (!clicked.Power.Active)
{
Game.Sound.PlayToPlayer(spm.Self.Owner, clicked.Power.Info.InsufficientPowerSound);
Game.Sound.PlayNotification(spm.Self.World.Map.Rules, spm.Self.Owner, "Speech",
clicked.Power.Info.InsufficientPowerSpeechNotification, spm.Self.Owner.Faction.InternalName);
}
else
clicked.Power.Target();
}