mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Added mod reinstall dialog
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -79,4 +79,14 @@ bool ModModel::isPackInstalled(ModPlatform::IndexedPack::Ptr pack) const
|
||||
});
|
||||
}
|
||||
|
||||
QVariant ModModel:: getInstalledPackVersion(ModPlatform::IndexedPack::Ptr pack) const
|
||||
{
|
||||
auto allMods = static_cast<MinecraftInstance&>(m_base_instance).loaderModList()->allMods();
|
||||
for (auto mod : allMods) {
|
||||
if (auto meta = mod->metadata(); meta && meta->provider == pack->provider && meta->project_id == pack->addonId) {
|
||||
return meta->version();
|
||||
}
|
||||
}
|
||||
return {};
|
||||
}
|
||||
} // namespace ResourceDownload
|
||||
|
Reference in New Issue
Block a user