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 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 )
{

View File

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

View File

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