Browse Source

Start of considering depleted values for Raw Ether surges and bases

main
Jonathan 11 months ago
parent
commit
fd20f8ca7d
  1. 20
      IGP/Pages/BuildCalculator/Parts/HighlightsComponent.razor
  2. 1
      Model/BuildOrders/BuildOrderModel.cs
  3. 1
      Services/IServices.cs
  4. 1
      Services/Immortal/BuildOrderService.cs
  5. 2
      Services/Immortal/EconomyService.cs

20
IGP/Pages/BuildCalculator/Parts/HighlightsComponent.razor

@ -42,6 +42,26 @@
}
}
</div>
<div>
<div>Depleted</div>
//TODO WIP
@foreach (var ordersAtTime in buildOrderService.CompletedOrders.Reverse())
{
foreach (var order in ordersAtTime.Value)
{
<div>
@ordersAtTime.Key | T @Interval.ToTime(ordersAtTime.Key)
</div>
<div>
@order.Info().Name
</div>
<br/>
}
}
</div>
</div>

1
Model/BuildOrders/BuildOrderModel.cs

@ -25,6 +25,7 @@ public class BuildOrderModel
public int CurrentSupplyUsed { get; set; } = 0;
public Dictionary<int, List<EntityModel>> StartedOrders { get; set; } = new();
public Dictionary<int, List<EntityModel>> CompletedOrders { get; set; } = new();
public Dictionary<int, List<EntityModel>> DepletedOrders { get; set; } = new();
public Dictionary<string, int> UniqueCompletedTimes { get; set; } = new();
public Dictionary<string, int> UniqueCompletedCount { get; set; } = new();
public Dictionary<int, int> SupplyCountTimes { get; set; } = new();

1
Services/IServices.cs

@ -284,6 +284,7 @@ public interface IBuildOrderService
{
public Dictionary<int, List<EntityModel>> StartedOrders { get; }
public Dictionary<int, List<EntityModel>> CompletedOrders { get; }
public Dictionary<int, List<EntityModel>> DepletedOrders { get; }
public Dictionary<string, int> UniqueCompletedTimes { get; }
public Dictionary<int, int> SupplyCountTimes { get; }

1
Services/Immortal/BuildOrderService.cs

@ -30,6 +30,7 @@ public class BuildOrderService : IBuildOrderService
public Dictionary<int, List<EntityModel>> StartedOrders => _buildOrder.StartedOrders;
public Dictionary<int, List<EntityModel>> CompletedOrders => _buildOrder.CompletedOrders;
public Dictionary<int, List<EntityModel>> DepletedOrders => _buildOrder.DepletedOrders;
public Dictionary<string, int> UniqueCompletedTimes => _buildOrder.UniqueCompletedTimes;
public Dictionary<int, int> SupplyCountTimes => _buildOrder.SupplyCountTimes;

2
Services/Immortal/EconomyService.cs

@ -169,7 +169,7 @@ public class EconomyService : IEconomyService
var usedWorkers = Math.Min(harvesterPoint.Slots, freeWorkers);
economyAtSecond.Alloy += harvesterPoint.HarvestedPerInterval * usedWorkers;
economyAtSecond.AlloyIncome += harvesterPoint.HarvestedPerInterval * usedWorkers;
freeWorkers -= usedWorkers;
if (usedWorkers < harvesterPoint.Slots) workersNeeded += 1;

Loading…
Cancel
Save