mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-14 10:12:59 +02:00
Update BuildAnalyzer.cpp
Revert unintentionally commited changes
This commit is contained in:
parent
72597b549b
commit
0c488145b9
@ -148,7 +148,6 @@ void BuildAnalyzer::update()
|
||||
auto towns = ai->cb->getTownsInfo();
|
||||
|
||||
float economyDevelopmentCost = 0;
|
||||
TResources nonGoldEconomyResources;
|
||||
|
||||
for(const CGTownInstance* town : towns)
|
||||
{
|
||||
@ -165,10 +164,7 @@ void BuildAnalyzer::update()
|
||||
for(auto building : developmentInfo.toBuild)
|
||||
{
|
||||
if (building.dailyIncome[EGameResID::GOLD] > 0)
|
||||
{
|
||||
economyDevelopmentCost += building.buildCostWithPrerequisites[EGameResID::GOLD];
|
||||
nonGoldEconomyResources += building.buildCostWithPrerequisites;
|
||||
}
|
||||
}
|
||||
armyCost += developmentInfo.armyCost;
|
||||
|
||||
@ -177,10 +173,6 @@ void BuildAnalyzer::update()
|
||||
logAi->trace("Building preferences %s", bi.toString());
|
||||
}
|
||||
}
|
||||
nonGoldEconomyResources[EGameResID::GOLD] = 0;
|
||||
//If we don't have the non-gold-resources to build a structure, we also don't need to save gold for it and can consider building something else instead
|
||||
if (!ai->getFreeResources().canAfford(nonGoldEconomyResources))
|
||||
economyDevelopmentCost = 0;
|
||||
|
||||
std::sort(developmentInfos.begin(), developmentInfos.end(), [](const TownDevelopmentInfo & t1, const TownDevelopmentInfo & t2) -> bool
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user