diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-05-31 21:45:28 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-05-31 21:50:01 +0200 |
commit | 6fd18a5cceb21f547fb95398215d9d30aeef0249 (patch) | |
tree | 754e3eee4c1f810eb601c26673edb95c59cbee9c /logic/minecraft/JarMod.cpp | |
parent | 9920062003d78864be886b1ddb79e484f44bc30a (diff) | |
download | MultiMC-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/JarMod.cpp')
-rw-r--r-- | logic/minecraft/JarMod.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/logic/minecraft/JarMod.cpp b/logic/minecraft/JarMod.cpp index c7ba58f1..bf711c1f 100644 --- a/logic/minecraft/JarMod.cpp +++ b/logic/minecraft/JarMod.cpp @@ -2,7 +2,7 @@ #include "MMCJson.h" using namespace MMCJson; -JarmodPtr Jarmod::fromJson(const QJsonObject &libObj, const QString &filename) +JarmodPtr Jarmod::fromJson(const QJsonObject &libObj, const QString &filename, const QString &originalName) { JarmodPtr out(new Jarmod()); if (!libObj.contains("name")) @@ -11,6 +11,7 @@ JarmodPtr Jarmod::fromJson(const QJsonObject &libObj, const QString &filename) "contains a jarmod that doesn't have a 'name' field"); } out->name = libObj.value("name").toString(); + out->originalName = libObj.value("originalName").toString(); return out; } @@ -18,5 +19,9 @@ QJsonObject Jarmod::toJson() { QJsonObject out; writeString(out, "name", name); + if(!originalName.isEmpty()) + { + writeString(out, "originalName", originalName); + } return out; } |