From 3a0c7fc274d1a452b7c24d9bea562f6629ba2b26 Mon Sep 17 00:00:00 2001 From: pchote Date: Sat, 27 Feb 2010 16:24:13 +1300 Subject: [PATCH] cnc: Fix "Silos Needed" alert --- OpenRa.Game/OpenRa.Game.csproj | 1 + OpenRa.Game/Player.cs | 4 ++-- mods/cnc/system.yaml | 3 +++ mods/ra/rules.yaml | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj index 8797e29151..ae74c3a932 100644 --- a/OpenRa.Game/OpenRa.Game.csproj +++ b/OpenRa.Game/OpenRa.Game.csproj @@ -266,6 +266,7 @@ + diff --git a/OpenRa.Game/Player.cs b/OpenRa.Game/Player.cs index ce61462eed..d5c1349447 100644 --- a/OpenRa.Game/Player.cs +++ b/OpenRa.Game/Player.cs @@ -107,7 +107,7 @@ namespace OpenRa if (PowerProvided - PowerDrained < 0) if (PowerProvided - PowerDrained != oldBalance) - GiveAdvice("lopower1.aud"); + GiveAdvice(PlayerActor.Info.Traits.Get().LowPower); } public float GetSiloFullness() @@ -146,7 +146,7 @@ namespace OpenRa Ore = OreCapacity; // trim off the overflow. if (Ore > .8 * OreCapacity) - GiveAdvice("silond1.aud"); // silos needed + GiveAdvice(PlayerActor.Info.Traits.Get().SilosNeeded); // silos needed } public bool TakeCash( int num ) diff --git a/mods/cnc/system.yaml b/mods/cnc/system.yaml index 65cbc9b3d5..f69d7edea4 100644 --- a/mods/cnc/system.yaml +++ b/mods/cnc/system.yaml @@ -8,6 +8,9 @@ Player: OnHoldAudio: onhold1.aud CancelledAudio: cancel1.aud ClickAudio: button.aud + EvaAlerts: + LowPower: lopower1.aud + SilosNeeded: silos1.aud PlaceBuilding: SpawnDefaultUnits: diff --git a/mods/ra/rules.yaml b/mods/ra/rules.yaml index f8f8f12aad..451f38acf4 100644 --- a/mods/ra/rules.yaml +++ b/mods/ra/rules.yaml @@ -1,5 +1,6 @@ Player: ProductionQueue: + EvaAlerts: PlaceBuilding: GpsPower: Image: gpssicon