Splitting large data file for less cumbersome editing and IDE lag

This commit is contained in:
Jonathan
2025-06-22 20:48:33 -04:00
parent 1bc78306b8
commit c0ea4a094e
28 changed files with 4699 additions and 4599 deletions
+8 -8
View File
@@ -290,14 +290,14 @@ public class BuildOrderService : IBuildOrderService
{
return (from ordersAtTime in _buildOrder.StartedOrders
from orders in ordersAtTime.Value
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 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();
}
+7 -8
View File
@@ -73,14 +73,16 @@ public class EconomyService : IEconomyService
}
private static void SetupCurrentInterval(
IBuildOrderService buildOrder,
EconomyModel economyAtSecond,
IBuildOrderService buildOrder,
EconomyModel economyAtSecond,
int interval)
{
economyAtSecond.Interval = interval;
economyAtSecond.HarvestPoints =
(from harvester
in buildOrder.GetUndepletedHarvestPointsCompletedBefore(interval + 1) // One second into the future for completed harvest points
(from harvester
in buildOrder
.GetUndepletedHarvestPointsCompletedBefore(interval +
1) // One second into the future for completed harvest points
select harvester).ToList();
}
@@ -166,10 +168,8 @@ public class EconomyService : IEconomyService
foreach (var harvesterPoint in
economyAtSecond.HarvestPoints.Select(entity => entity.Harvest()))
{
//if (harvesterPoint.IsDepleted(economyAtSecond.Interval))
// continue;
switch (harvesterPoint.RequiresWorker)
{
case true:
@@ -207,7 +207,6 @@ public class EconomyService : IEconomyService
break;
}
}
}
return workersNeeded;
}
@@ -220,7 +219,7 @@ public class EconomyService : IEconomyService
private void CarryOverEconomyFromPreviousInterval(int interval, EconomyModel economyAtSecond)
{
if (interval <= 0) return;
economyAtSecond.Alloy = buildEconomyOverTime[interval - 1].Alloy;
economyAtSecond.Ether = buildEconomyOverTime[interval - 1].Ether;
economyAtSecond.Pyre = buildEconomyOverTime[interval - 1].Pyre;
+1 -1
View File
@@ -75,7 +75,7 @@ public class SearchService : ISearchService
}
foreach (var entity in DATA.Get().Values)
foreach (var entity in EntityData.Get().Values)
{
var summary =
entity.Info().Description.Length > 35