Updated dependencies
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
9aac8e389f
commit
35d62cc5f2
@ -45,6 +45,14 @@ static ModPlatform::ModLoaderTypes mcLoaders(BaseInstance* inst)
|
|||||||
return static_cast<MinecraftInstance*>(inst)->getPackProfile()->getSupportedModLoaders().value();
|
return static_cast<MinecraftInstance*>(inst)->getPackProfile()->getSupportedModLoaders().value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool checkDependencies(std::shared_ptr<GetModDependenciesTask::PackDependency> sel,
|
||||||
|
Version mcVersion,
|
||||||
|
ModPlatform::ModLoaderTypes loaders)
|
||||||
|
{
|
||||||
|
return (sel->pack->versions.isEmpty() || sel->version.mcVersion.contains(mcVersion.toString())) &&
|
||||||
|
(!loaders || !sel->version.loaders || sel->version.loaders & loaders);
|
||||||
|
}
|
||||||
|
|
||||||
GetModDependenciesTask::GetModDependenciesTask(QObject* parent,
|
GetModDependenciesTask::GetModDependenciesTask(QObject* parent,
|
||||||
BaseInstance* instance,
|
BaseInstance* instance,
|
||||||
ModFolderModel* folder,
|
ModFolderModel* folder,
|
||||||
@ -67,9 +75,10 @@ GetModDependenciesTask::GetModDependenciesTask(QObject* parent,
|
|||||||
void GetModDependenciesTask::prepare()
|
void GetModDependenciesTask::prepare()
|
||||||
{
|
{
|
||||||
for (auto sel : m_selected) {
|
for (auto sel : m_selected) {
|
||||||
for (auto dep : getDependenciesForVersion(sel->version, sel->pack->provider)) {
|
if (checkDependencies(sel, m_version, m_loaderType))
|
||||||
addTask(prepareDependencyTask(dep, sel->pack->provider, 20));
|
for (auto dep : getDependenciesForVersion(sel->version, sel->pack->provider)) {
|
||||||
}
|
addTask(prepareDependencyTask(dep, sel->pack->provider, 20));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ ModFilterWidget::ModFilterWidget(MinecraftInstance* instance, bool extendedSuppo
|
|||||||
ui->versionsCb->setStyleSheet("combobox-popup: 0;");
|
ui->versionsCb->setStyleSheet("combobox-popup: 0;");
|
||||||
ui->versionsSimpleCb->setStyleSheet("combobox-popup: 0;");
|
ui->versionsSimpleCb->setStyleSheet("combobox-popup: 0;");
|
||||||
connect(ui->snapshotsCb, &QCheckBox::stateChanged, this, &ModFilterWidget::onIncludeSnapshotsChanged);
|
connect(ui->snapshotsCb, &QCheckBox::stateChanged, this, &ModFilterWidget::onIncludeSnapshotsChanged);
|
||||||
connect(ui->versionsCb, &QComboBox::currentIndexChanged, this, &ModFilterWidget::onVersionFilterChanged);
|
connect(ui->versionsCb, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ModFilterWidget::onVersionFilterChanged);
|
||||||
connect(ui->versionsSimpleCb, &QComboBox::currentTextChanged, this, &ModFilterWidget::onVersionFilterTextChanged);
|
connect(ui->versionsSimpleCb, &QComboBox::currentTextChanged, this, &ModFilterWidget::onVersionFilterTextChanged);
|
||||||
|
|
||||||
connect(ui->neoForgeCb, &QCheckBox::stateChanged, this, &ModFilterWidget::onLoadersFilterChanged);
|
connect(ui->neoForgeCb, &QCheckBox::stateChanged, this, &ModFilterWidget::onLoadersFilterChanged);
|
||||||
|
Loading…
Reference in New Issue
Block a user