1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-03 23:19:22 +02:00

Added common method to get names of hardcoded mod scopes

This commit is contained in:
Ivan Savenko
2022-12-07 15:18:19 +02:00
parent 65f9a1ffd2
commit 2cbe6bcb47
27 changed files with 119 additions and 64 deletions

View File

@@ -999,7 +999,7 @@ namespace
bool testFilePresence(std::string scope, ResourceID resource)
{
std::set<std::string> allowedScopes;
if(scope != "core" && !scope.empty()) // all real mods may have dependencies
if(scope != CModHandler::scopeBuiltin() && !scope.empty()) // all real mods may have dependencies
{
//NOTE: recursive dependencies are not allowed at the moment - update code if this changes
bool found = true;
@@ -1008,7 +1008,7 @@ namespace
if(!found)
return false;
allowedScopes.insert("core"); // all mods can use H3 files
allowedScopes.insert(CModHandler::scopeBuiltin()); // all mods can use H3 files
}
allowedScopes.insert(scope); // mods can use their own files