1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-08 00:39:47 +02:00

Allow enabling of compatible mods only

This commit is contained in:
nordsoft 2022-09-22 16:41:13 +04:00
parent 3d3c513603
commit 145103a32d

View File

@ -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);