mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Remove Capitol-related code, it's redundant now.
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user