Fan website of IMMORTAL: Gates of Pyre.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

29 lines
1.1 KiB

using System.Collections.Generic;
using System.Linq;
using Model.Entity;
namespace Model.BuildOrders;
public class BuildOrderModel
{
public string Name { get; set; } = "";
public string Color { get; set; } = "red";
public string Notes { get; set; } = @"";
public List<string> BuildTypes { get; set; } = new();
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<string, int> UniqueCompletedTimes { get; set; } = new();
public Dictionary<string, int> UniqueCompletedCount { get; set; } = new();
public Dictionary<int, int> SupplyCountTimes { get; set; } = new();
public List<EntityModel> GetHarvestersCompletedBefore(int interval)
{
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
select orders).ToList();
}
}