diff options
author | Andrew <forkk@forkk.net> | 2013-12-15 15:01:34 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-12-15 15:01:34 -0600 |
commit | 9d8006b597aead06f1d51dacbdb346ebab3d5e8f (patch) | |
tree | 1f99ca1da321be32930198e3d72b2fc9d3bf53de /logic/OneSixInstance.cpp | |
parent | 0ee8f90d40f5b3ddb177286c9066a4e59748c681 (diff) | |
parent | b0e8037feb5b9d48defe6b8263d068f87bdb141c (diff) | |
download | MultiMC-9d8006b597aead06f1d51dacbdb346ebab3d5e8f.tar MultiMC-9d8006b597aead06f1d51dacbdb346ebab3d5e8f.tar.gz MultiMC-9d8006b597aead06f1d51dacbdb346ebab3d5e8f.tar.lz MultiMC-9d8006b597aead06f1d51dacbdb346ebab3d5e8f.tar.xz MultiMC-9d8006b597aead06f1d51dacbdb346ebab3d5e8f.zip |
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into feature_news
Conflicts:
CMakeLists.txt
Diffstat (limited to 'logic/OneSixInstance.cpp')
-rw-r--r-- | logic/OneSixInstance.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/logic/OneSixInstance.cpp b/logic/OneSixInstance.cpp index 337830a2..fd41b9e5 100644 --- a/logic/OneSixInstance.cpp +++ b/logic/OneSixInstance.cpp @@ -152,8 +152,17 @@ QStringList OneSixInstance::processMinecraftArgs(MojangAccountPtr account) token_mapping["game_directory"] = absRootDir; QString absAssetsDir = QDir("assets/").absolutePath(); token_mapping["game_assets"] = reconstructAssets(d->version).absolutePath(); - //TODO: this is something new and not even fully implemented in the vanilla launcher. - token_mapping["user_properties"] = "{ }"; + + auto user = account->user(); + QJsonObject userAttrs; + for(auto key: user.properties.keys()) + { + auto array = QJsonArray::fromStringList(user.properties.values(key)); + userAttrs.insert(key, array); + } + QJsonDocument value(userAttrs); + + token_mapping["user_properties"] = value.toJson(QJsonDocument::Compact); token_mapping["user_type"] = account->currentProfile()->legacy ? "legacy" : "mojang"; // 1.7.3+ assets tokens token_mapping["assets_root"] = absAssetsDir; |