From 6fd18a5cceb21f547fb95398215d9d30aeef0249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 31 May 2015 21:45:28 +0200 Subject: 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 --- logic/minecraft/JarMod.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'logic/minecraft/JarMod.cpp') 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; } -- cgit v1.2.3