Tweak special powers

This commit is contained in:
Paul Chote
2010-06-13 16:33:32 +12:00
parent 77510b4bef
commit 8397bc12b5
3 changed files with 9 additions and 8 deletions

View File

@@ -43,7 +43,6 @@ namespace OpenRA.Traits
public readonly string UnitReadyAudio = "unitrdy1.aud";
public readonly string OnHoldAudio = "onhold1.aud";
public readonly string CancelledAudio = "cancld1.aud";
public readonly string ClickAudio = "ramenu1.aud";
public readonly string NewOptions = "newopt1.aud";
// For manual powerup/down in ra-ng
@@ -57,6 +56,9 @@ namespace OpenRA.Traits
public readonly string NavalUnitLost = "navylst1.aud";
public readonly string PrimaryBuildingSelected = "pribldg1.aud";
public readonly string CreditsStolen = "credit1.aud";
// Special powers
public readonly string AbilityInsufficientPower = "nopowr1.aud";
}
public class EvaAlerts {}

View File

@@ -136,14 +136,12 @@ namespace OpenRA.Traits
public void Activate()
{
if (!IsAvailable || !IsReady)
{
Sound.Play("briefing.aud");
return;
}
if (Info.RequiresPower && !IsPowered())
{
Sound.Play("nopowr1.aud");
var eva = Owner.World.WorldActor.Info.Traits.Get<EvaAlertsInfo>();
Sound.Play(eva.AbilityInsufficientPower);
return;
}