Splitting large data file for less cumbersome editing and IDE lag
This commit is contained in:
@@ -73,14 +73,16 @@ public class EconomyService : IEconomyService
|
||||
}
|
||||
|
||||
private static void SetupCurrentInterval(
|
||||
IBuildOrderService buildOrder,
|
||||
EconomyModel economyAtSecond,
|
||||
IBuildOrderService buildOrder,
|
||||
EconomyModel economyAtSecond,
|
||||
int interval)
|
||||
{
|
||||
economyAtSecond.Interval = interval;
|
||||
economyAtSecond.HarvestPoints =
|
||||
(from harvester
|
||||
in buildOrder.GetUndepletedHarvestPointsCompletedBefore(interval + 1) // One second into the future for completed harvest points
|
||||
(from harvester
|
||||
in buildOrder
|
||||
.GetUndepletedHarvestPointsCompletedBefore(interval +
|
||||
1) // One second into the future for completed harvest points
|
||||
select harvester).ToList();
|
||||
}
|
||||
|
||||
@@ -166,10 +168,8 @@ public class EconomyService : IEconomyService
|
||||
|
||||
foreach (var harvesterPoint in
|
||||
economyAtSecond.HarvestPoints.Select(entity => entity.Harvest()))
|
||||
{
|
||||
//if (harvesterPoint.IsDepleted(economyAtSecond.Interval))
|
||||
// continue;
|
||||
|
||||
switch (harvesterPoint.RequiresWorker)
|
||||
{
|
||||
case true:
|
||||
@@ -207,7 +207,6 @@ public class EconomyService : IEconomyService
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return workersNeeded;
|
||||
}
|
||||
@@ -220,7 +219,7 @@ public class EconomyService : IEconomyService
|
||||
private void CarryOverEconomyFromPreviousInterval(int interval, EconomyModel economyAtSecond)
|
||||
{
|
||||
if (interval <= 0) return;
|
||||
|
||||
|
||||
economyAtSecond.Alloy = buildEconomyOverTime[interval - 1].Alloy;
|
||||
economyAtSecond.Ether = buildEconomyOverTime[interval - 1].Ether;
|
||||
economyAtSecond.Pyre = buildEconomyOverTime[interval - 1].Pyre;
|
||||
|
||||
Reference in New Issue
Block a user