Fixed bugs

This commit is contained in:
6d486f49
2025-11-07 18:22:21 -05:00
parent 8ce9084ffb
commit fe1a583da9
8 changed files with 31 additions and 34 deletions
+3 -9
View File
@@ -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)
{
+1 -1
View File
@@ -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)