aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/flame/FlameResourceModels.cpp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-09-16 18:20:45 +0200
committerGitHub <noreply@github.com>2023-09-16 18:20:45 +0200
commitbf6dc10f355f95095d8b21154189257980dda4a2 (patch)
treee6a78559d8f666f468165066f21eff6289a2cb04 /launcher/ui/pages/modplatform/flame/FlameResourceModels.cpp
parent4cb424470be46926bc7583332e3f94133d1e7583 (diff)
parent94c1cd6bcfbc7a66286c18bf1d1c3854f49deb64 (diff)
downloadPrismLauncher-bf6dc10f355f95095d8b21154189257980dda4a2.tar.gz
PrismLauncher-bf6dc10f355f95095d8b21154189257980dda4a2.tar.bz2
PrismLauncher-bf6dc10f355f95095d8b21154189257980dda4a2.zip
Merge pull request #1605 from TheKodeToad/flame-shaders
Diffstat (limited to 'launcher/ui/pages/modplatform/flame/FlameResourceModels.cpp')
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameResourceModels.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/launcher/ui/pages/modplatform/flame/FlameResourceModels.cpp b/launcher/ui/pages/modplatform/flame/FlameResourceModels.cpp
index c80e4f99..7d18e72a 100644
--- a/launcher/ui/pages/modplatform/flame/FlameResourceModels.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlameResourceModels.cpp
@@ -121,4 +121,27 @@ auto FlameTexturePackModel::documentToArray(QJsonDocument& obj) const -> QJsonAr
return Json::ensureArray(obj.object(), "data");
}
+FlameShaderPackModel::FlameShaderPackModel(const BaseInstance& base) : ShaderPackResourceModel(base, new FlameAPI) {}
+
+void FlameShaderPackModel::loadIndexedPack(ModPlatform::IndexedPack& m, QJsonObject& obj)
+{
+ FlameMod::loadIndexedPack(m, obj);
+}
+
+// We already deal with the URLs when initializing the pack, due to the API response's structure
+void FlameShaderPackModel::loadExtraPackInfo(ModPlatform::IndexedPack& m, QJsonObject& obj)
+{
+ FlameMod::loadBody(m, obj);
+}
+
+void FlameShaderPackModel::loadIndexedPackVersions(ModPlatform::IndexedPack& m, QJsonArray& arr)
+{
+ FlameMod::loadIndexedPackVersions(m, arr, APPLICATION->network(), &m_base_instance);
+}
+
+auto FlameShaderPackModel::documentToArray(QJsonDocument& obj) const -> QJsonArray
+{
+ return Json::ensureArray(obj.object(), "data");
+}
+
} // namespace ResourceDownload