aboutsummaryrefslogtreecommitdiff
path: root/launcher/modplatform/ResourceAPI.h
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-08-27 20:41:56 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-08-27 20:41:56 +0300
commit0680d2dceb27f18b1c888bf16079dfd00d07b3ca (patch)
tree6874b9733973fc6488a8ebe8bd394f73593b41a7 /launcher/modplatform/ResourceAPI.h
parentab6301d5a1a2a77d12d73f4ff7088551d6b8aa2e (diff)
parent9110fbf2829a48c36fe37cabfb438e165956bbcf (diff)
downloadPrismLauncher-0680d2dceb27f18b1c888bf16079dfd00d07b3ca.tar.gz
PrismLauncher-0680d2dceb27f18b1c888bf16079dfd00d07b3ca.tar.bz2
PrismLauncher-0680d2dceb27f18b1c888bf16079dfd00d07b3ca.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into develop
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/modplatform/ResourceAPI.h')
-rw-r--r--launcher/modplatform/ResourceAPI.h30
1 files changed, 3 insertions, 27 deletions
diff --git a/launcher/modplatform/ResourceAPI.h b/launcher/modplatform/ResourceAPI.h
index f6ccb426..7965d0f5 100644
--- a/launcher/modplatform/ResourceAPI.h
+++ b/launcher/modplatform/ResourceAPI.h
@@ -54,9 +54,6 @@ class ResourceAPI {
public:
virtual ~ResourceAPI() = default;
- enum ModLoaderType { NeoForge = 1 << 0, Forge = 1 << 1, Cauldron = 1 << 2, LiteLoader = 1 << 3, Fabric = 1 << 4, Quilt = 1 << 5 };
- Q_DECLARE_FLAGS(ModLoaderTypes, ModLoaderType)
-
struct SortingMethod {
// The index of the sorting method. Used to allow for arbitrary ordering in the list of methods.
// Used by Flame in the API request.
@@ -74,7 +71,7 @@ class ResourceAPI {
std::optional<QString> search;
std::optional<SortingMethod> sorting;
- std::optional<ModLoaderTypes> loaders;
+ std::optional<ModPlatform::ModLoaderTypes> loaders;
std::optional<std::list<Version> > versions;
};
struct SearchCallbacks {
@@ -87,7 +84,7 @@ class ResourceAPI {
ModPlatform::IndexedPack pack;
std::optional<std::list<Version> > mcVersions;
- std::optional<ModLoaderTypes> loaders;
+ std::optional<ModPlatform::ModLoaderTypes> loaders;
VersionSearchArgs(VersionSearchArgs const&) = default;
void operator=(VersionSearchArgs other)
@@ -114,7 +111,7 @@ class ResourceAPI {
struct DependencySearchArgs {
ModPlatform::Dependency dependency;
Version mcVersion;
- ModLoaderTypes loader;
+ ModPlatform::ModLoaderTypes loader;
};
struct DependencySearchCallbacks {
@@ -161,27 +158,6 @@ class ResourceAPI {
return nullptr;
}
- static auto getModLoaderString(ModLoaderType type) -> const QString
- {
- switch (type) {
- case NeoForge:
- return "neoforge";
- case Forge:
- return "forge";
- case Cauldron:
- return "cauldron";
- case LiteLoader:
- return "liteloader";
- case Fabric:
- return "fabric";
- case Quilt:
- return "quilt";
- default:
- break;
- }
- return "";
- }
-
protected:
[[nodiscard]] inline QString debugName() const { return "External resource API"; }