Browse Source

Remove Capitol-related code, it's redundant now.

DJWarmonger 7 years ago
parent
commit
6fd403d7cf
1 changed files with 0 additions and 12 deletions
  1. 0 12
      AI/VCAI/ResourceManager.cpp

+ 0 - 12
AI/VCAI/ResourceManager.cpp

@@ -288,18 +288,6 @@ TResources ResourceManager::reservedResources() const
 TResources ResourceManager::freeResources() const
 {
 	TResources myRes = cb->getResourceAmount();
-	auto towns = cb->getTownsInfo();
-	if (towns.size()) //we don't save for Capitol if there are no towns
-	{
-		if (std::none_of(towns.begin(), towns.end(), [](const CGTownInstance * x) -> bool
-		{
-			return x->builtBuildings.find(BuildingID::CAPITOL) != x->builtBuildings.end();
-		}))
-		{
-			myRes[Res::GOLD] -= GOLD_RESERVE;
-			//what if capitol is blocked from building in all possessed towns (set in map editor)?
-		}
-	}
 	myRes -= reservedResources(); //substract the value of reserved goals
 
 	for (auto & val : myRes)