Hide not installed translation mods to languages other than selected one

This commit is contained in:
Ivan Savenko committed 2023-10-22 00:07:21 +03:00
1 parent b50ebba1ba
commit adf58fa834
3 files changed
+23 -4

No files matched your search

+15 -2
View File
@@ -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();
}