Fixed bugs
This commit is contained in:
@@ -290,15 +290,9 @@ public class BuildOrderService : IBuildOrderService
|
||||
{
|
||||
return (from ordersAtTime in _buildOrder.StartedOrders
|
||||
from orders in ordersAtTime.Value
|
||||
where ordersAtTime.Key + (orders.Production() == null
|
||||
? 0
|
||||
: orders.Production().BuildTime) <= interval
|
||||
&& !orders.Harvest().IsDepleted(
|
||||
interval,
|
||||
ordersAtTime.Key + (orders.Production() == null
|
||||
? 0
|
||||
: orders.Production().BuildTime))
|
||||
where orders.Harvest() != null
|
||||
where orders.Harvester() != null
|
||||
&& ordersAtTime.Key + (orders.Production()?.BuildTime ?? 0) <= interval
|
||||
&& !orders.Harvester()!.IsDepleted(interval,ordersAtTime.Key + (orders.Production()?.BuildTime ?? 0))
|
||||
select orders).ToList();
|
||||
}
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ public class EconomyComparisionService : IEconomyComparisonService
|
||||
// Add funds
|
||||
foreach (var entity in economyAtSecond.HarvestPoints)
|
||||
{
|
||||
var harvester = entity.Harvest();
|
||||
var harvester = entity.Harvester();
|
||||
if (harvester.RequiresWorker)
|
||||
if (harvester.Resource == ResourceType.Alloy)
|
||||
{
|
||||
|
||||
@@ -167,7 +167,7 @@ public class EconomyService : IEconomyService
|
||||
|
||||
|
||||
foreach (var harvesterPoint in
|
||||
economyAtSecond.HarvestPoints.Select(entity => entity.Harvest()))
|
||||
economyAtSecond.HarvestPoints.Select(entity => entity.Harvester()))
|
||||
//if (harvesterPoint.IsDepleted(economyAtSecond.Interval))
|
||||
// continue;
|
||||
switch (harvesterPoint.RequiresWorker)
|
||||
|
||||
Reference in New Issue
Block a user