Enables "insufficient power"-speech in RA and C&C when powered-down supportpowerwidget is clicked
This commit is contained in:
@@ -167,7 +167,15 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
|
||||
Action<MouseInput> HandleSupportPower(string key, SupportPowerManager manager)
|
||||
{
|
||||
return mi => { if (mi.Button == MouseButton.Left) manager.Target(key); };
|
||||
return mi =>
|
||||
{
|
||||
if (mi.Button == MouseButton.Left)
|
||||
{
|
||||
if (!manager.Powers[key].Active)
|
||||
Sound.PlayToPlayer(manager.self.Owner, manager.Powers[key].Info.InsufficientPowerSound);
|
||||
manager.Target(key);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user