@@ -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 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -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 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user