mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Fix subObject identification
This commit is contained in:
		| @@ -884,3 +884,16 @@ void CModHandler::afterLoad() | ||||
| 	std::ofstream file(*CResourceHandler::get()->getResourceName(ResourceID("config/modSettings.json")), std::ofstream::trunc); | ||||
| 	file << modSettings; | ||||
| } | ||||
|  | ||||
| std::string CModHandler::normalizeIdentifier(const std::string & scope, const std::string & remoteScope, const std::string & identifier) const | ||||
| { | ||||
| 	auto p = splitString(identifier, ':'); | ||||
|  | ||||
| 	if(p.first.empty()) | ||||
| 		p.first = scope; | ||||
|  | ||||
| 	if(p.first == remoteScope) | ||||
| 		p.first.clear(); | ||||
|  | ||||
| 	return p.first.empty() ? p.second : p.first +":"+p.second; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user