mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Hide not installed translation mods to languages other than selected one
This commit is contained in:
@@ -92,8 +92,21 @@ bool CModEntry::isInstalled() const
|
||||
|
||||
bool CModEntry::isVisible() const
|
||||
{
|
||||
if (getBaseValue("modType").toString() == "Compatibility" && isSubmod())
|
||||
return false;
|
||||
if (getBaseValue("modType").toString() == "Compatibility")
|
||||
{
|
||||
if (isSubmod())
|
||||
return false;
|
||||
}
|
||||
|
||||
if (getBaseValue("modType").toString() == "Translation")
|
||||
{
|
||||
// Do not show not installed translation mods to languages other than player language
|
||||
if (localData.empty() && getBaseValue("language") != QString::fromStdString(settings["general"]["language"].String()) )
|
||||
return false;
|
||||
|
||||
if (isSubmod())
|
||||
return false;
|
||||
}
|
||||
|
||||
return !localData.isEmpty() || !repository.isEmpty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user