From ae0af7f2e26dd5dff57ab99e809a476961e5902e Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 22 Feb 2010 21:37:37 +1300 Subject: [PATCH] #94 harvester pip count should be configurable --- OpenRa.Game/Traits/Harvester.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRa.Game/Traits/Harvester.cs b/OpenRa.Game/Traits/Harvester.cs index d8a1a7ecdf..319c5c9640 100644 --- a/OpenRa.Game/Traits/Harvester.cs +++ b/OpenRa.Game/Traits/Harvester.cs @@ -26,6 +26,8 @@ namespace OpenRa.Traits class HarvesterInfo : ITraitInfo { public readonly int BailCount = 28; + public readonly int PipCount = 7; + public object Create(Actor self) { return new Harvester(self); } } @@ -91,7 +93,8 @@ namespace OpenRa.Traits public IEnumerable GetPips(Actor self) { - const int numPips = 7; + int numPips = self.Info.Traits.Get().PipCount; + for (int i = 0; i < numPips; i++) { if (gemsCarried * 1.0f / self.Info.Traits.Get().BailCount > i * 1.0f / numPips)