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:
parent
3d3c513603
commit
145103a32d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user