game patch(Immortal) 0.0.6.9121a patch updates, plus WIP build calculator code

This commit is contained in:
2022-04-13 01:38:47 -04:00
parent 80a516e0f2
commit 656b914c6e
27 changed files with 383 additions and 128 deletions
+18 -5
View File
@@ -10,7 +10,19 @@ public class BuildOrderModel
public string Name { get; set; } = "";
public string Color { get; set; } = "red";
public Dictionary<int, List<EntityModel>> Orders { get; set; } = new()
public Dictionary<int, List<EntityModel>> StartedOrders { get; set; } = new()
{
{
0,
new List<EntityModel>
{
EntityModel.Get(DataType.STARTING_Bastion),
EntityModel.Get(DataType.STARTING_TownHall_Aru)
}
}
};
public Dictionary<int, List<EntityModel>> CompletedOrders { get; set; } = new()
{
{
0,
@@ -29,7 +41,7 @@ public class BuildOrderModel
public List<EntityModel> GetOrdersAt(int interval)
{
return (from ordersAtTime in Orders
return (from ordersAtTime in StartedOrders
from orders in ordersAtTime.Value
where ordersAtTime.Key == interval
select orders).ToList();
@@ -37,7 +49,7 @@ public class BuildOrderModel
public List<EntityModel> GetCompletedAt(int interval)
{
return (from ordersAtTime in Orders
return (from ordersAtTime in StartedOrders
from orders in ordersAtTime.Value
where ordersAtTime.Key + (orders.Production() == null ? 0 : orders.Production().BuildTime) == interval
select orders).ToList();
@@ -45,15 +57,16 @@ public class BuildOrderModel
public List<EntityModel> GetCompletedBefore(int interval)
{
return (from ordersAtTime in Orders
return (from ordersAtTime in StartedOrders
from orders in ordersAtTime.Value
where ordersAtTime.Key >= interval
where ordersAtTime.Key + (orders.Production() == null ? 0 : orders.Production().BuildTime) <= interval
select orders).ToList();
}
public List<EntityModel> GetHarvestersCompletedBefore(int interval)
{
return (from ordersAtTime in Orders
return (from ordersAtTime in StartedOrders
from orders in ordersAtTime.Value
where ordersAtTime.Key + (orders.Production() == null ? 0 : orders.Production().BuildTime) <= interval
where orders.Harvest() != null