Better harvester pip behavior

This commit is contained in:
pchote
2009-12-18 15:54:13 -08:00
parent 144ffa2444
commit cdea6b642b

View File

@@ -56,12 +56,16 @@ namespace OpenRa.Game.Traits
} }
public Color GetBorderColor() { return Color.Black; } public Color GetBorderColor() { return Color.Black; }
public int GetPipCount() { return 7; } public int GetPipCount() { return 10; }
public Color GetColorForPip(int index) public Color GetColorForPip(int index)
{ {
if ((oreCarried + gemsCarried)*1.0f/Rules.General.BailCount* GetPipCount() < index + 1) if (gemsCarried * 1.0f / Rules.General.BailCount > index * 1.0f / GetPipCount())
return Color.Transparent; return Color.Red;
return Color.LimeGreen;
if ((gemsCarried + oreCarried) * 1.0f / Rules.General.BailCount > index * 1.0f / GetPipCount())
return Color.Yellow;
return Color.Transparent;
} }
} }
} }