diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2023-06-24 14:04:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-24 14:04:27 +0100 |
commit | bcf45c74a1b0b3389c05927637bf8aa95b8e43cf (patch) | |
tree | ba0519e490c627d5d491cc4ff980921a84d29c41 /launcher/modplatform/ModIndex.h | |
parent | df6d46de9e648284a788a327b87698d58a4fc145 (diff) | |
parent | 8b576fd2bd442a61092de870b4323c280b04d2d6 (diff) | |
download | PrismLauncher-bcf45c74a1b0b3389c05927637bf8aa95b8e43cf.tar.gz PrismLauncher-bcf45c74a1b0b3389c05927637bf8aa95b8e43cf.tar.bz2 PrismLauncher-bcf45c74a1b0b3389c05927637bf8aa95b8e43cf.zip |
Merge pull request #986 from Trial97/develop
Mod dependencies
Diffstat (limited to 'launcher/modplatform/ModIndex.h')
-rw-r--r-- | launcher/modplatform/ModIndex.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/launcher/modplatform/ModIndex.h b/launcher/modplatform/ModIndex.h index 82da2ab2..3b0a03a1 100644 --- a/launcher/modplatform/ModIndex.h +++ b/launcher/modplatform/ModIndex.h @@ -1,7 +1,8 @@ // SPDX-License-Identifier: GPL-3.0-only /* - * PolyMC - Minecraft Launcher + * Prism Launcher - Minecraft Launcher * Copyright (c) 2022 flowln <flowlnlnln@gmail.com> + * Copyright (c) 2023 Trial97 <alexandru.tripon97@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,6 +34,8 @@ enum class ResourceProvider { MODRINTH, FLAME }; enum class ResourceType { MOD, RESOURCE_PACK, SHADER_PACK }; +enum class DependencyType { REQUIRED, OPTIONAL, INCOMPATIBLE, EMBEDDED, TOOL, INCLUDE, UNKNOWN }; + class ProviderCapabilities { public: auto name(ResourceProvider) -> const char*; @@ -52,6 +55,12 @@ struct DonationData { QString url; }; +struct Dependency { + QVariant addonId; + DependencyType type; + QString version; +}; + struct IndexedVersion { QVariant addonId; QVariant fileId; @@ -66,6 +75,7 @@ struct IndexedVersion { QString hash; bool is_preferred = true; QString changelog; + QList<Dependency> dependencies; // For internal use, not provided by APIs bool is_currently_selected = false; @@ -119,6 +129,22 @@ struct IndexedPack { } }; +struct OverrideDep { + QString quilt; + QString fabric; + QString slug; + ModPlatform::ResourceProvider provider; +}; + +inline auto getOverrideDeps() -> QList<OverrideDep> +{ + return { { "634179", "306612", "API", ModPlatform::ResourceProvider::FLAME }, + { "720410", "308769", "KotlinLibraries", ModPlatform::ResourceProvider::FLAME }, + + { "qvIfYCYJ", "P7dR8mSH", "API", ModPlatform::ResourceProvider::MODRINTH }, + { "lwVhp9o5", "Ha28R6CL", "KotlinLibraries", ModPlatform::ResourceProvider::MODRINTH } }; +}; + } // namespace ModPlatform Q_DECLARE_METATYPE(ModPlatform::IndexedPack) |