Temp is depleted logic

This commit is contained in:
Jonathan
2025-06-22 18:46:51 -04:00
parent 826717c47f
commit 1bc78306b8
6 changed files with 37 additions and 49 deletions
+9 -2
View File
@@ -286,11 +286,18 @@ public class BuildOrderService : IBuildOrderService
select orders).ToList();
}
public List<EntityModel> GetHarvestPointsCompletedBefore(int interval)
public List<EntityModel> GetUndepletedHarvestPointsCompletedBefore(int interval)
{
return (from ordersAtTime in _buildOrder.StartedOrders
from orders in ordersAtTime.Value
where ordersAtTime.Key + (orders.Production() == null ? 0 : orders.Production().BuildTime) <= interval
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
select orders).ToList();
}