Remove GetSiloFullness.

This commit is contained in:
Paul Chote
2011-01-02 11:53:01 +13:00
parent 2048900c10
commit f3da258763
3 changed files with 3 additions and 4 deletions

View File

@@ -45,8 +45,6 @@ namespace OpenRA.Traits
public int DisplayCash;
public int DisplayOre;
public float GetSiloFullness() { return (float)Ore / OreCapacity; }
public void GiveOre(int num)
{
Ore += num;

View File

@@ -26,8 +26,9 @@ namespace OpenRA.Mods.RA.Render
public void BuildingComplete( Actor self )
{
var pr = self.Owner.PlayerActor.Trait<PlayerResources>();
anim.PlayFetchIndex( "idle",
() => (int)( 4.9 * self.Owner.PlayerActor.Trait<PlayerResources>().GetSiloFullness() ) );
() => (49 * pr.Ore) / (10*pr.OreCapacity));
}
}
}

View File

@@ -56,7 +56,7 @@ namespace OpenRA.Mods.RA
public IEnumerable<PipType> GetPips(Actor self)
{
return Graphics.Util.MakeArray( Info.PipCount,
i => (Player.GetSiloFullness() > i * 1.0f / Info.PipCount)
i => ( Player.Ore * Info.PipCount > i * Player.OreCapacity )
? Info.PipColor : PipType.Transparent );
}