#94 harvester pip count should be configurable

This commit is contained in:
Chris Forbes
2010-02-22 21:37:37 +13:00
parent 250aa178c5
commit ae0af7f2e2

View File

@@ -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<PipType> GetPips(Actor self)
{
const int numPips = 7;
int numPips = self.Info.Traits.Get<HarvesterInfo>().PipCount;
for (int i = 0; i < numPips; i++)
{
if (gemsCarried * 1.0f / self.Info.Traits.Get<HarvesterInfo>().BailCount > i * 1.0f / numPips)