1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-01 12:57:51 +02:00

Prefer local mod data, unless repository has newer mod

This commit is contained in:
Ivan Savenko 2024-12-10 13:53:49 +00:00
parent 13497b5fa5
commit 4682ae537d

View File

@ -120,8 +120,7 @@ const JsonNode & ModDescription::getLocalizedValue(const std::string & keyName)
const JsonNode & ModDescription::getValue(const std::string & keyName) const const JsonNode & ModDescription::getValue(const std::string & keyName) const
{ {
const JsonNode & localValue = getLocalValue(keyName); if (!isInstalled() || isUpdateAvailable())
if (localValue.isNull())
return getRepositoryValue(keyName); return getRepositoryValue(keyName);
else else
return getLocalValue(keyName); return getLocalValue(keyName);