feat(BuildCalc) Wait To button and some WIP code
This commit is contained in:
@@ -17,7 +17,7 @@ public class BuildOrderModel
|
||||
{
|
||||
Initialize(factionType);
|
||||
}
|
||||
|
||||
|
||||
public string Name { get; set; } = "";
|
||||
public string Notes { get; set; } = @"";
|
||||
|
||||
@@ -28,19 +28,18 @@ public class BuildOrderModel
|
||||
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 Dictionary<string, Dictionary<int, List<EntityModel>>> UniqueCompleted { get; set; } = new();
|
||||
|
||||
public List<TrainingCapacityUsedModel> TrainingCapacityModels { get; set; } = new();
|
||||
public List<TrainingCapacityUsedModel> TrainingCapacityUsed { get; set; } = new();
|
||||
|
||||
public void Initialize(string faction)
|
||||
{
|
||||
string factionStartingTownHall = faction.Equals(DataType.FACTION_QRath) ? DataType.STARTING_TownHall_QRath :
|
||||
var factionStartingTownHall = faction.Equals(DataType.FACTION_QRath) ? DataType.STARTING_TownHall_QRath :
|
||||
faction.Equals(DataType.FACTION_Aru) ? DataType.STARTING_TownHall_Aru : "";
|
||||
|
||||
if (factionStartingTownHall.Equals(""))
|
||||
{
|
||||
throw new Exception("Reminder to add support to new factions");
|
||||
}
|
||||
|
||||
if (factionStartingTownHall.Equals("")) throw new Exception("Reminder to add support to new factions");
|
||||
|
||||
StartedOrders = new Dictionary<int, List<EntityModel>>
|
||||
{
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Model.Economy;
|
||||
using Model.Entity;
|
||||
@@ -8,22 +7,25 @@ using Model.Entity.Data;
|
||||
namespace Model.BuildOrders;
|
||||
|
||||
public class BuildToCompareModel
|
||||
{
|
||||
{
|
||||
private int numberOfTownHallExpansions;
|
||||
public string Faction { get; set; }
|
||||
|
||||
public EntityModel GetTownHallEntity => DATA.Get()[
|
||||
Faction.Equals(DataType.FACTION_QRath) ? DataType.BUILDING_Acropolis
|
||||
Faction.Equals(DataType.FACTION_QRath)
|
||||
? DataType.BUILDING_Acropolis
|
||||
: DataType.BUILDING_GroveHeart];
|
||||
|
||||
|
||||
public EntityModel GetTownHallMining2Entity => DATA.Get()[
|
||||
Faction.Equals(DataType.FACTION_QRath) ? DataType.BUPGRADE_MiningLevel2_QRath
|
||||
Faction.Equals(DataType.FACTION_QRath)
|
||||
? DataType.BUPGRADE_MiningLevel2_QRath
|
||||
: DataType.BUPGRADE_MiningLevel2_Aru];
|
||||
|
||||
public EntityModel GetTownHallMining3Entity => DATA.Get()[
|
||||
Faction.Equals(DataType.FACTION_QRath) ? DataType.BUPGRADE_MiningLevel3_QRath
|
||||
Faction.Equals(DataType.FACTION_QRath)
|
||||
? DataType.BUPGRADE_MiningLevel3_QRath
|
||||
: DataType.BUPGRADE_MiningLevel3_Aru];
|
||||
|
||||
|
||||
private int numberOfTownHallExpansions = 0;
|
||||
public int NumberOfTownHallExpansions
|
||||
{
|
||||
get => numberOfTownHallExpansions;
|
||||
@@ -33,22 +35,18 @@ public class BuildToCompareModel
|
||||
{
|
||||
numberOfTownHallExpansions = value;
|
||||
while (TimeToBuildTownHall.Count < numberOfTownHallExpansions)
|
||||
{
|
||||
TimeToBuildTownHall.Add((TimeToBuildTownHall.Count + 1) * 30);
|
||||
}
|
||||
while (TimeToBuildTownHall.Count > numberOfTownHallExpansions)
|
||||
{
|
||||
TimeToBuildTownHall.Remove(TimeToBuildTownHall.Last());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<int> TimeToBuildTownHall { get; set; } = new();
|
||||
|
||||
|
||||
public List<EconomyModel> EconomyOverTimeModel { get; set; } = new();
|
||||
|
||||
|
||||
public BuildOrderModel BuildOrderModel { get; set; } = new();
|
||||
|
||||
|
||||
public string ChartColor { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Model.Entity.Data;
|
||||
|
||||
namespace Model.BuildOrders;
|
||||
|
||||
public class ResearchSlot
|
||||
{
|
||||
public int StartingInterval { get; set; } = 30;
|
||||
public int Slots { get; set; } = 1;
|
||||
public string ResearchType { get; set; } = DataType.BUILDING_Reliquary;
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
|
||||
|
||||
using Model.Entity.Data;
|
||||
using Model.Entity.Data;
|
||||
|
||||
namespace Model.BuildOrders;
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
using Model.Entity.Data;
|
||||
|
||||
namespace Model.BuildOrders;
|
||||
|
||||
public class TrainingSlot
|
||||
{
|
||||
public int StartingInterval { get; set; } = 30;
|
||||
public int Slots { get; set; } = 16;
|
||||
public string ProductionType { get; set; } = DataType.BUILDING_LegionHall;
|
||||
}
|
||||
Reference in New Issue
Block a user