mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Allow enabling of compatible mods only
This commit is contained in:
@@ -284,6 +284,15 @@ CModEntry CModList::getMod(QString modname) const
|
||||
}
|
||||
}
|
||||
|
||||
if(settings.value("active").toBool())
|
||||
{
|
||||
auto compatibility = local.value("compatibility").toMap();
|
||||
if(compatibility["min"].isValid() || compatibility["max"].isValid())
|
||||
if(!isCompatible(compatibility["min"].toString(), compatibility["max"].toString()))
|
||||
settings["active"] = false;
|
||||
}
|
||||
|
||||
|
||||
for(auto entry : repositories)
|
||||
{
|
||||
QVariant repoVal = getValue(entry, path);
|
||||
|
Reference in New Issue
Block a user