1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Fixes mod install / uninstall / updates

This commit is contained in:
Ivan Savenko
2024-11-15 13:25:36 +00:00
parent 30ed066cea
commit 85ffb449ca
4 changed files with 38 additions and 51 deletions

View File

@ -192,7 +192,28 @@ bool ModDescription::isInstalled() const
bool ModDescription::affectsGameplay() const
{
return true; // TODO
static const std::array keysToTest = {
"artifacts",
"battlefields",
"creatures",
"factions",
"heroClasses",
"heroes",
"objects",
"obstacles",
"rivers",
"roads",
"settings",
"skills",
"spells",
"terrains",
};
for(const auto & key : keysToTest)
if (!getLocalValue(key).isNull())
return true;
return false;
}
VCMI_LIB_NAMESPACE_END