summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/VersionFile.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-05-31 21:45:28 +0200
committerPetr Mrázek <peterix@gmail.com>2015-05-31 21:50:01 +0200
commit6fd18a5cceb21f547fb95398215d9d30aeef0249 (patch)
tree754e3eee4c1f810eb601c26673edb95c59cbee9c /logic/minecraft/VersionFile.cpp
parent9920062003d78864be886b1ddb79e484f44bc30a (diff)
downloadMultiMC-6fd18a5cceb21f547fb95398215d9d30aeef0249.tar
MultiMC-6fd18a5cceb21f547fb95398215d9d30aeef0249.tar.gz
MultiMC-6fd18a5cceb21f547fb95398215d9d30aeef0249.tar.lz
MultiMC-6fd18a5cceb21f547fb95398215d9d30aeef0249.tar.xz
MultiMC-6fd18a5cceb21f547fb95398215d9d30aeef0249.zip
GH-1016 print list of mods, coremods and jarmods
Includes a change to jar mods, where they gain an 'originalName' attribute used only for display
Diffstat (limited to 'logic/minecraft/VersionFile.cpp')
-rw-r--r--logic/minecraft/VersionFile.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/logic/minecraft/VersionFile.cpp b/logic/minecraft/VersionFile.cpp
index 6ef5a8bc..227ba8be 100644
--- a/logic/minecraft/VersionFile.cpp
+++ b/logic/minecraft/VersionFile.cpp
@@ -155,7 +155,13 @@ VersionFilePtr VersionFile::fromJson(const QJsonDocument &doc, const QString &fi
{
QJsonObject libObj = ensureObject(libVal);
// parse the jarmod
- auto lib = Jarmod::fromJson(libObj, filename);
+ auto lib = Jarmod::fromJson(libObj, filename, out->name);
+ if(lib->originalName.isEmpty())
+ {
+ auto fixed = out->name;
+ fixed.remove(" (jar mod)");
+ lib->originalName = out->name;
+ }
// and add to jar mods
out->jarMods.append(lib);
}