This commit is contained in:
Chris Forbes
2009-12-05 22:20:41 +13:00
parent dfbf299055
commit 2de5ec4b3a
3 changed files with 14 additions and 4 deletions

View File

@@ -63,7 +63,17 @@ namespace OpenRa.Game
} }
public void GiveCash( int num ) { Cash += num; } public void GiveCash( int num ) { Cash += num; }
public void GiveOre(int num) { Ore += num; } public void GiveOre(int num)
{
Ore += num;
var capacity = GetOreCapacity();
if (Ore > capacity)
Ore = capacity; // trim off the overflow.
if (Ore > .8 * capacity)
Sound.Play("silond1.aud");
}
public bool TakeCash( int num ) public bool TakeCash( int num )
{ {

View File

@@ -69,10 +69,10 @@ namespace OpenRa.Game.Traits
switch( state ) switch( state )
{ {
case DamageState.Normal: case DamageState.Normal:
anim.PlayRepeating("idle"); anim.ReplaceAnim("idle");
break; break;
case DamageState.Half: case DamageState.Half:
anim.PlayRepeating("damaged-idle"); anim.ReplaceAnim("damaged-idle");
Sound.Play("kaboom1.aud"); Sound.Play("kaboom1.aud");
break; break;
case DamageState.Dead: case DamageState.Dead:

View File

@@ -7,7 +7,7 @@ namespace OpenRa.Game.Traits
: base(self) : base(self)
{ {
Make( () => anim.PlayFetchIndex("idle", Make( () => anim.PlayFetchIndex("idle",
() => (int)(5 * self.Owner.GetSiloFullness())), self); () => (int)(4.9 * self.Owner.GetSiloFullness())), self); /* hack */
} }
} }
} }