diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2023-07-08 22:03:47 +0100 |
---|---|---|
committer | TheKodeToad <TheKodeToad@proton.me> | 2023-07-08 22:16:43 +0100 |
commit | d53d58a5d42684c5151680016f38a0f4bd1c0298 (patch) | |
tree | 90f1b2b981e3c912e845b9f34bdc0095a8c20518 /launcher/ui/dialogs | |
parent | 67d473aab773e7f94c394ebdde05581dc8f805de (diff) | |
download | PrismLauncher-d53d58a5d42684c5151680016f38a0f4bd1c0298.tar.gz PrismLauncher-d53d58a5d42684c5151680016f38a0f4bd1c0298.tar.bz2 PrismLauncher-d53d58a5d42684c5151680016f38a0f4bd1c0298.zip |
LiteMod downloading
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/ui/dialogs')
-rw-r--r-- | launcher/ui/dialogs/ResourceDownloadDialog.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/launcher/ui/dialogs/ResourceDownloadDialog.cpp b/launcher/ui/dialogs/ResourceDownloadDialog.cpp index 4f59f560..b17eced3 100644 --- a/launcher/ui/dialogs/ResourceDownloadDialog.cpp +++ b/launcher/ui/dialogs/ResourceDownloadDialog.cpp @@ -43,6 +43,8 @@ #include "ui/pages/modplatform/flame/FlameResourcePages.h" #include "ui/pages/modplatform/modrinth/ModrinthResourcePages.h" +#include "modplatform/flame/FlameAPI.h" +#include "modplatform/modrinth/ModrinthAPI.h" #include "ui/widgets/PageContainer.h" namespace ResourceDownload { @@ -281,8 +283,11 @@ QList<BasePage*> ModDownloadDialog::getPages() { QList<BasePage*> pages; - pages.append(ModrinthModPage::create(this, *m_instance)); - if (APPLICATION->capabilities() & Application::SupportsFlame) + auto loaders = static_cast<MinecraftInstance*>(m_instance)->getPackProfile()->getModLoaders().value(); + + if (ModrinthAPI::validateModLoaders(loaders)) + pages.append(ModrinthModPage::create(this, *m_instance)); + if (APPLICATION->capabilities() & Application::SupportsFlame && FlameAPI::validateModLoaders(loaders)) pages.append(FlameModPage::create(this, *m_instance)); m_selectedPage = dynamic_cast<ModPage*>(pages[0]); |