summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/curse
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-04-22 05:20:06 +0200
committerPetr Mrázek <peterix@gmail.com>2017-04-22 05:20:06 +0200
commit77a1d39f6b623ede3e8ce9245459e0f864a1d176 (patch)
treef43630d5eb717edafd0db8235dc96f6dd810fe92 /api/logic/minecraft/curse
parent6a525db78d2f3fd9deec817bfd3fc9c5162991c3 (diff)
downloadMultiMC-77a1d39f6b623ede3e8ce9245459e0f864a1d176.tar
MultiMC-77a1d39f6b623ede3e8ce9245459e0f864a1d176.tar.gz
MultiMC-77a1d39f6b623ede3e8ce9245459e0f864a1d176.tar.lz
MultiMC-77a1d39f6b623ede3e8ce9245459e0f864a1d176.tar.xz
MultiMC-77a1d39f6b623ede3e8ce9245459e0f864a1d176.zip
NOISSUE fix problems in old curse packs
Added: * jarmod importing * fixing of bad minecraft versions * mapping of undefined 'recommended' forge versions to something appropriate * some fake guessing of pack icons * fixes for some more issues found with the pack manifest format
Diffstat (limited to 'api/logic/minecraft/curse')
-rw-r--r--api/logic/minecraft/curse/PackManifest.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/api/logic/minecraft/curse/PackManifest.cpp b/api/logic/minecraft/curse/PackManifest.cpp
index 2fde8a01..7d9c2f89 100644
--- a/api/logic/minecraft/curse/PackManifest.cpp
+++ b/api/logic/minecraft/curse/PackManifest.cpp
@@ -18,7 +18,8 @@ static void loadModloaderV1(Curse::Modloader & m, QJsonObject & modLoader)
static void loadMinecraftV1(Curse::Minecraft & m, QJsonObject & minecraft)
{
m.version = Json::requireString(minecraft, "version");
- // FIXME: default unknown, assuming empty. Meaning also unknown.
+ // extra libraries... apparently only used for a custom Minecraft launcher in the 1.2.5 FTB retro pack
+ // intended use is likely hardcoded in the Curse client, the manifest says nothing
m.libraries = Json::ensureString(minecraft, QString("libraries"), QString());
auto arr = Json::ensureArray(minecraft, "modLoaders", QJsonArray());
for (const auto & item : arr)
@@ -34,9 +35,9 @@ static void loadManifestV1(Curse::Manifest & m, QJsonObject & manifest)
{
auto mc = Json::requireObject(manifest, "minecraft");
loadMinecraftV1(m.minecraft, mc);
- m.name = Json::requireString(manifest, "name");
- m.version = Json::requireString(manifest, "version");
- m.author = Json::requireString(manifest, "author");
+ m.name = Json::ensureString(manifest, QString("name"), "Unnamed");
+ m.version = Json::ensureString(manifest, QString("version"), QString());
+ m.author = Json::ensureString(manifest, QString("author"), "Anonymous Coward");
auto arr = Json::ensureArray(manifest, "files", QJsonArray());
for (const auto & item : arr)
{