Added error message when exporting snapshots with curseforge
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
932531c8ba
commit
fd5b155ee7
@ -409,16 +409,20 @@ QByteArray FlamePackExportTask::generateIndex()
|
|||||||
// convert all available components to mrpack dependencies
|
// convert all available components to mrpack dependencies
|
||||||
if (minecraft != nullptr)
|
if (minecraft != nullptr)
|
||||||
version["version"] = minecraft->m_version;
|
version["version"] = minecraft->m_version;
|
||||||
|
QString id;
|
||||||
QJsonObject loader;
|
|
||||||
if (quilt != nullptr)
|
if (quilt != nullptr)
|
||||||
loader["id"] = "quilt-" + quilt->getVersion();
|
id = "quilt-" + quilt->getVersion();
|
||||||
else if (fabric != nullptr)
|
else if (fabric != nullptr)
|
||||||
loader["id"] = "fabric-" + fabric->getVersion();
|
id = "fabric-" + fabric->getVersion();
|
||||||
else if (forge != nullptr)
|
else if (forge != nullptr)
|
||||||
loader["id"] = "forge-" + forge->getVersion();
|
id = "forge-" + forge->getVersion();
|
||||||
|
version["modLoaders"] = QJsonArray();
|
||||||
|
if (!id.isEmpty()) {
|
||||||
|
QJsonObject loader;
|
||||||
|
loader["id"] = id;
|
||||||
loader["primary"] = true;
|
loader["primary"] = true;
|
||||||
version["modLoaders"] = QJsonArray({ loader });
|
version["modLoaders"] = QJsonArray({ loader });
|
||||||
|
}
|
||||||
obj["minecraft"] = version;
|
obj["minecraft"] = version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1422,9 +1422,16 @@ void MainWindow::on_actionExportInstanceFlamePack_triggered()
|
|||||||
if (m_selectedInstance) {
|
if (m_selectedInstance) {
|
||||||
auto instance = dynamic_cast<MinecraftInstance*>(m_selectedInstance.get());
|
auto instance = dynamic_cast<MinecraftInstance*>(m_selectedInstance.get());
|
||||||
if (instance) {
|
if (instance) {
|
||||||
|
QString errorMsg;
|
||||||
if (instance->getPackProfile()->getComponent("org.quiltmc.quilt-loader")) {
|
if (instance->getPackProfile()->getComponent("org.quiltmc.quilt-loader")) {
|
||||||
|
errorMsg = tr("Quilt is currently not supported by CurseForge modpacks.");
|
||||||
|
} else if (auto cmp = instance->getPackProfile()->getComponent("net.minecraft");
|
||||||
|
cmp && cmp->getVersionFile() && cmp->getVersionFile()->type == "snapshot") {
|
||||||
|
errorMsg = tr("Snapshots are currently not supported by CurseForge modpacks.");
|
||||||
|
}
|
||||||
|
if (!errorMsg.isEmpty()) {
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
msgBox.setText(tr("Quilt is currently not supported by CurseForge modpacks."));
|
msgBox.setText(errorMsg);
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user