Technic: Include the modpack version in instance title
This commit is contained in:
parent
f267375ac2
commit
9d88f07955
@ -36,6 +36,7 @@ struct Modpack {
|
|||||||
QString websiteUrl;
|
QString websiteUrl;
|
||||||
QString author;
|
QString author;
|
||||||
QString description;
|
QString description;
|
||||||
|
QString currentVersion;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,6 +189,7 @@ void TechnicPage::suggestCurrent()
|
|||||||
current.websiteUrl = Json::ensureString(obj, "platformUrl", QString(), "__placeholder__");
|
current.websiteUrl = Json::ensureString(obj, "platformUrl", QString(), "__placeholder__");
|
||||||
current.author = Json::ensureString(obj, "user", QString(), "__placeholder__");
|
current.author = Json::ensureString(obj, "user", QString(), "__placeholder__");
|
||||||
current.description = Json::ensureString(obj, "description", QString(), "__placeholder__");
|
current.description = Json::ensureString(obj, "description", QString(), "__placeholder__");
|
||||||
|
current.currentVersion = Json::ensureString(obj, "version", QString(), "__placeholder__");
|
||||||
current.metadataLoaded = true;
|
current.metadataLoaded = true;
|
||||||
metadataLoaded();
|
metadataLoaded();
|
||||||
});
|
});
|
||||||
@ -214,11 +215,11 @@ void TechnicPage::metadataLoaded()
|
|||||||
ui->frame->setModDescription(current.description);
|
ui->frame->setModDescription(current.description);
|
||||||
if (!current.isSolder)
|
if (!current.isSolder)
|
||||||
{
|
{
|
||||||
dialog->setSuggestedPack(current.name, new Technic::SingleZipPackInstallTask(current.url, current.minecraftVersion));
|
dialog->setSuggestedPack(current.name + " " + current.currentVersion, new Technic::SingleZipPackInstallTask(current.url, current.minecraftVersion));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (current.url.endsWith('/')) current.url.chop(1);
|
while (current.url.endsWith('/')) current.url.chop(1);
|
||||||
dialog->setSuggestedPack(current.name, new Technic::SolderPackInstallTask(APPLICATION->network(), current.url + "/modpack/" + current.slug, current.minecraftVersion));
|
dialog->setSuggestedPack(current.name + " " + current.currentVersion, new Technic::SolderPackInstallTask(APPLICATION->network(), current.url + "/modpack/" + current.slug, current.minecraftVersion));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user