mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-20 20:23:03 +02:00
revert launcher changes
This commit is contained in:
parent
89d0de53da
commit
2c2c044191
@ -51,6 +51,10 @@ public:
|
|||||||
bool isInstalled() const;
|
bool isInstalled() const;
|
||||||
// vcmi essential files
|
// vcmi essential files
|
||||||
bool isEssential() const;
|
bool isEssential() const;
|
||||||
|
// checks if verison is compatible with vcmi
|
||||||
|
bool isCompatible() const;
|
||||||
|
// returns if has any data
|
||||||
|
bool isValid() const;
|
||||||
|
|
||||||
// see ModStatus enum
|
// see ModStatus enum
|
||||||
int getModStatus() const;
|
int getModStatus() const;
|
||||||
|
@ -245,6 +245,7 @@ bool CModFilterModel::filterMatchesThis(const QModelIndex & source) const
|
|||||||
{
|
{
|
||||||
CModEntry mod = base->getMod(source.data(ModRoles::ModNameRole).toString());
|
CModEntry mod = base->getMod(source.data(ModRoles::ModNameRole).toString());
|
||||||
return (mod.getModStatus() & filterMask) == filteredType &&
|
return (mod.getModStatus() & filterMask) == filteredType &&
|
||||||
|
mod.isValid() &&
|
||||||
QSortFilterProxyModel::filterAcceptsRow(source.row(), source.parent());
|
QSortFilterProxyModel::filterAcceptsRow(source.row(), source.parent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,6 +169,10 @@ bool CModManager::canEnableMod(QString modname)
|
|||||||
if(!mod.isInstalled())
|
if(!mod.isInstalled())
|
||||||
return addError(modname, "Mod must be installed first");
|
return addError(modname, "Mod must be installed first");
|
||||||
|
|
||||||
|
//check for compatibility
|
||||||
|
if(!mod.isCompatible())
|
||||||
|
return addError(modname, "Mod is not compatible, please update VCMI and checkout latest mod revisions");
|
||||||
|
|
||||||
for(auto modEntry : mod.getValue("depends").toStringList())
|
for(auto modEntry : mod.getValue("depends").toStringList())
|
||||||
{
|
{
|
||||||
if(!modList->hasMod(modEntry)) // required mod is not available
|
if(!modList->hasMod(modEntry)) // required mod is not available
|
||||||
|
Loading…
Reference in New Issue
Block a user