From cdea6b642b14d20e820f16aa7681b1d04d248daf Mon Sep 17 00:00:00 2001 From: pchote Date: Fri, 18 Dec 2009 15:54:13 -0800 Subject: [PATCH] Better harvester pip behavior --- OpenRa.Game/Traits/Harvester.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenRa.Game/Traits/Harvester.cs b/OpenRa.Game/Traits/Harvester.cs index 1b2f15422b..097c676262 100644 --- a/OpenRa.Game/Traits/Harvester.cs +++ b/OpenRa.Game/Traits/Harvester.cs @@ -56,12 +56,16 @@ namespace OpenRa.Game.Traits } public Color GetBorderColor() { return Color.Black; } - public int GetPipCount() { return 7; } + public int GetPipCount() { return 10; } public Color GetColorForPip(int index) { - if ((oreCarried + gemsCarried)*1.0f/Rules.General.BailCount* GetPipCount() < index + 1) - return Color.Transparent; - return Color.LimeGreen; + if (gemsCarried * 1.0f / Rules.General.BailCount > index * 1.0f / GetPipCount()) + return Color.Red; + + if ((gemsCarried + oreCarried) * 1.0f / Rules.General.BailCount > index * 1.0f / GetPipCount()) + return Color.Yellow; + + return Color.Transparent; } } }