aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/flame
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-08-23 10:26:57 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-08-23 10:26:57 +0300
commit4704c522e002e0da2c9ce49f71456fce684ab3a1 (patch)
treecce59aedd1f57985e6a444de3c72957d58abfa79 /launcher/modplatform/flame
parentf7951f6082ac21ac19bc0089d01d6c7f5b322422 (diff)
downloadPrismLauncher-4704c522e002e0da2c9ce49f71456fce684ab3a1.tar.gz
PrismLauncher-4704c522e002e0da2c9ce49f71456fce684ab3a1.tar.bz2
PrismLauncher-4704c522e002e0da2c9ce49f71456fce684ab3a1.zip
moved modloaderTypes to ModPlatform
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/modplatform/flame')
-rw-r--r--launcher/modplatform/flame/FlameAPI.h23
-rw-r--r--launcher/modplatform/flame/FlameCheckUpdate.h2
2 files changed, 14 insertions, 11 deletions
diff --git a/launcher/modplatform/flame/FlameAPI.h b/launcher/modplatform/flame/FlameAPI.h
index e423189a..a36b99a4 100644
--- a/launcher/modplatform/flame/FlameAPI.h
+++ b/launcher/modplatform/flame/FlameAPI.h
@@ -24,7 +24,10 @@ class FlameAPI : public NetworkResourceAPI {
[[nodiscard]] auto getSortingMethods() const -> QList<ResourceAPI::SortingMethod> override;
- static inline auto validateModLoaders(ModLoaderTypes loaders) -> bool { return loaders & (NeoForge | Forge | Fabric | Quilt); }
+ static inline auto validateModLoaders(ModPlatform::ModLoaderTypes loaders) -> bool
+ {
+ return loaders & (ModPlatform::NeoForge | ModPlatform::Forge | ModPlatform::Fabric | ModPlatform::Quilt);
+ }
private:
static int getClassId(ModPlatform::ResourceType type)
@@ -38,19 +41,19 @@ class FlameAPI : public NetworkResourceAPI {
}
}
- static int getMappedModLoader(ModLoaderTypes loaders)
+ static int getMappedModLoader(ModPlatform::ModLoaderTypes loaders)
{
// https://docs.curseforge.com/?http#tocS_ModLoaderType
- if (loaders & Forge)
+ if (loaders & ModPlatform::Forge)
return 1;
- if (loaders & Fabric)
+ if (loaders & ModPlatform::Fabric)
return 4;
// TODO: remove this once Quilt drops official Fabric support
- if (loaders & Quilt) // NOTE: Most if not all Fabric mods should work *currently*
- return 4; // FIXME: implement multiple loaders filter (this should be 5)
+ if (loaders & ModPlatform::Quilt) // NOTE: Most if not all Fabric mods should work *currently*
+ return 4; // FIXME: implement multiple loaders filter (this should be 5)
// TODO: remove this once NeoForge drops official Forge support
- if (loaders & NeoForge) // NOTE: Most if not all Forge mods should work *currently*
- return 1; // FIXME: implement multiple loaders filter (this should be 6)
+ if (loaders & ModPlatform::NeoForge) // NOTE: Most if not all Forge mods should work *currently*
+ return 1; // FIXME: implement multiple loaders filter (this should be 6)
return 0;
}
@@ -93,7 +96,7 @@ class FlameAPI : public NetworkResourceAPI {
if (args.loaders.has_value()) {
int mappedModLoader = getMappedModLoader(args.loaders.value());
- if (args.loaders.value() & Quilt) {
+ if (args.loaders.value() & ModPlatform::Quilt) {
auto overide = ModPlatform::getOverrideDeps();
auto over = std::find_if(overide.cbegin(), overide.cend(), [addonId](auto dep) {
return dep.provider == ModPlatform::ResourceProvider::FLAME && addonId == dep.quilt;
@@ -113,7 +116,7 @@ class FlameAPI : public NetworkResourceAPI {
{
auto mappedModLoader = getMappedModLoader(args.loader);
auto addonId = args.dependency.addonId.toString();
- if (args.loader & Quilt) {
+ if (args.loader & ModPlatform::Quilt) {
auto overide = ModPlatform::getOverrideDeps();
auto over = std::find_if(overide.cbegin(), overide.cend(), [addonId](auto dep) {
return dep.provider == ModPlatform::ResourceProvider::FLAME && addonId == dep.quilt;
diff --git a/launcher/modplatform/flame/FlameCheckUpdate.h b/launcher/modplatform/flame/FlameCheckUpdate.h
index e3465d7e..05c619a7 100644
--- a/launcher/modplatform/flame/FlameCheckUpdate.h
+++ b/launcher/modplatform/flame/FlameCheckUpdate.h
@@ -10,7 +10,7 @@ class FlameCheckUpdate : public CheckUpdateTask {
public:
FlameCheckUpdate(QList<Mod*>& mods,
std::list<Version>& mcVersions,
- std::optional<ResourceAPI::ModLoaderTypes> loaders,
+ std::optional<ModPlatform::ModLoaderTypes> loaders,
std::shared_ptr<ModFolderModel> mods_folder)
: CheckUpdateTask(mods, mcVersions, loaders, mods_folder)
{}