diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-28 17:46:01 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-28 17:46:01 +0300 |
commit | c23bf2fd226d7e27b33b94b9c3509b1abcaa6fe3 (patch) | |
tree | 5b99cdd84af9ef4d6bda225311689f76dead1a8a /launcher/modplatform/ModIndex.h | |
parent | 0063d52952f654fb11031b3b8f0fb684202e2f1c (diff) | |
parent | faec21d572549793293bf41127e384811f8a66dc (diff) | |
download | PrismLauncher-c23bf2fd226d7e27b33b94b9c3509b1abcaa6fe3.tar.gz PrismLauncher-c23bf2fd226d7e27b33b94b9c3509b1abcaa6fe3.tar.bz2 PrismLauncher-c23bf2fd226d7e27b33b94b9c3509b1abcaa6fe3.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into settings
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) |