summaryrefslogtreecommitdiffstats
path: root/logic/OneSixVersion.cpp
diff options
context:
space:
mode:
authorSky <git@bunnies.cc>2013-12-08 06:12:53 +0000
committerSky <git@bunnies.cc>2013-12-08 06:12:53 +0000
commit2fe27fd0daca14644a2a71456cd60c9a38befbdf (patch)
tree929b9b5b369367895f2afcb74216aa9cf840ffb4 /logic/OneSixVersion.cpp
parent6d438b2ef3ca320d89eb5830024d02610ef8f6d6 (diff)
downloadMultiMC-2fe27fd0daca14644a2a71456cd60c9a38befbdf.tar
MultiMC-2fe27fd0daca14644a2a71456cd60c9a38befbdf.tar.gz
MultiMC-2fe27fd0daca14644a2a71456cd60c9a38befbdf.tar.lz
MultiMC-2fe27fd0daca14644a2a71456cd60c9a38befbdf.tar.xz
MultiMC-2fe27fd0daca14644a2a71456cd60c9a38befbdf.zip
More work on new assets system. Works given a properly constructed assets folder, no downloading yet
Diffstat (limited to 'logic/OneSixVersion.cpp')
-rw-r--r--logic/OneSixVersion.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/logic/OneSixVersion.cpp b/logic/OneSixVersion.cpp
index cc5b1de1..e586402b 100644
--- a/logic/OneSixVersion.cpp
+++ b/logic/OneSixVersion.cpp
@@ -17,6 +17,8 @@
#include "logic/OneSixLibrary.h"
#include "logic/OneSixRule.h"
+#include "logger/QsLog.h"
+
std::shared_ptr<OneSixVersion> fromJsonV4(QJsonObject root,
std::shared_ptr<OneSixVersion> fullVersion)
{
@@ -60,6 +62,18 @@ std::shared_ptr<OneSixVersion> fromJsonV4(QJsonObject root,
fullVersion->releaseTime = root.value("releaseTime").toString();
fullVersion->time = root.value("time").toString();
+ auto assetsID = root.value("assets");
+ if (assetsID.isString())
+ {
+ fullVersion->assets = assetsID.toString();
+ }
+ else
+ {
+ fullVersion->assets = "legacy";
+ }
+
+ QLOG_DEBUG() << "Assets version:" << fullVersion->assets;
+
// Iterate through the list, if it's a list.
auto librariesValue = root.value("libraries");
if (!librariesValue.isArray())
@@ -151,7 +165,7 @@ std::shared_ptr<OneSixVersion> OneSixVersion::fromJson(QJsonObject root)
root.value("minimumLauncherVersion").toDouble();
// ADD MORE HERE :D
- if (launcher_ver > 0 && launcher_ver <= 11)
+ if (launcher_ver > 0 && launcher_ver <= 12)
return fromJsonV4(root, readVersion);
else
{