Enables "insufficient power"-speech in RA and C&C when powered-down supportpowerwidget is clicked

This commit is contained in:
Kanar
2014-01-27 04:29:32 +01:00
parent 8685ec64ae
commit 17cf890dce
10 changed files with 22 additions and 6 deletions

View File

@@ -168,7 +168,11 @@ namespace OpenRA.Mods.Cnc.Widgets
.Select(i => i.Value).FirstOrDefault();
if (clicked != null)
{
if (!clicked.Power.Active)
Sound.PlayToPlayer(spm.self.Owner, clicked.Power.Info.InsufficientPowerSound);
spm.Target(clicked.Power.Info.OrderName);
}
return true;
}