feat(BuildCalc) Add +income to calculator info

This commit is contained in:
2022-05-03 19:13:34 -04:00
parent c16c0172bc
commit 0caa61f42e
5 changed files with 22 additions and 7 deletions
+9 -1
View File
@@ -173,6 +173,8 @@ public class EconomyService : IEconomyService
{
var usedWorkers = Math.Min(harvester.Slots, freeWorkers);
economyAtSecond.Alloy += harvester.HarvestedPerInterval * usedWorkers;
economyAtSecond.AlloyIncome += harvester.HarvestedPerInterval * usedWorkers;
freeWorkers -= usedWorkers;
if (usedWorkers < harvester.Slots) workersNeeded += 1;
@@ -181,10 +183,16 @@ public class EconomyService : IEconomyService
if (harvester.RequiresWorker == false)
{
if (harvester.Resource == ResourceType.Ether)
{
economyAtSecond.Ether += harvester.HarvestedPerInterval * harvester.Slots;
economyAtSecond.EtherIncome += harvester.HarvestedPerInterval * harvester.Slots;
}
if (harvester.Resource == ResourceType.Alloy)
{
economyAtSecond.Alloy += harvester.HarvestedPerInterval * harvester.Slots;
economyAtSecond.AlloyIncome += harvester.HarvestedPerInterval * harvester.Slots;
}
}
}