diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-12-08 22:19:58 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-12-08 22:19:58 +0100 |
commit | 8db2e5db81c91cca9291ca35ed74e632278563e6 (patch) | |
tree | b4aa9ff8db2561e674e03027b05107a973e4d3a5 /logic/OneSixVersion.cpp | |
parent | b0dbd4f4afcf60e4021cbb3218bfe280c4989859 (diff) | |
parent | 2fe27fd0daca14644a2a71456cd60c9a38befbdf (diff) | |
download | MultiMC-8db2e5db81c91cca9291ca35ed74e632278563e6.tar MultiMC-8db2e5db81c91cca9291ca35ed74e632278563e6.tar.gz MultiMC-8db2e5db81c91cca9291ca35ed74e632278563e6.tar.lz MultiMC-8db2e5db81c91cca9291ca35ed74e632278563e6.tar.xz MultiMC-8db2e5db81c91cca9291ca35ed74e632278563e6.zip |
Merge branch 'feature_assets' into develop
Diffstat (limited to 'logic/OneSixVersion.cpp')
-rw-r--r-- | logic/OneSixVersion.cpp | 16 |
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 { |