Use non-mod metadata in ModrinthPackExportTask
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
5eff9b0934
commit
13e13ea8fc
8 changed files with 143 additions and 109 deletions
|
@ -1403,27 +1403,26 @@ void MainWindow::on_actionExportInstanceZip_triggered()
|
|||
|
||||
void MainWindow::on_actionExportInstanceMrPack_triggered()
|
||||
{
|
||||
if (m_selectedInstance) {
|
||||
ExportPackDialog dlg(m_selectedInstance, this);
|
||||
auto instance = std::dynamic_pointer_cast<MinecraftInstance>(m_selectedInstance);
|
||||
if (instance) {
|
||||
ExportPackDialog dlg(std::move(instance), this);
|
||||
dlg.exec();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_actionExportInstanceFlamePack_triggered()
|
||||
{
|
||||
if (m_selectedInstance) {
|
||||
auto instance = dynamic_cast<MinecraftInstance*>(m_selectedInstance.get());
|
||||
if (instance) {
|
||||
if (auto cmp = instance->getPackProfile()->getComponent("net.minecraft");
|
||||
cmp && cmp->getVersionFile() && cmp->getVersionFile()->type == "snapshot") {
|
||||
QMessageBox msgBox(this);
|
||||
msgBox.setText("Snapshots are currently not supported by CurseForge modpacks.");
|
||||
msgBox.exec();
|
||||
return;
|
||||
}
|
||||
ExportPackDialog dlg(m_selectedInstance, this, ModPlatform::ResourceProvider::FLAME);
|
||||
dlg.exec();
|
||||
auto instance = std::dynamic_pointer_cast<MinecraftInstance>(m_selectedInstance);
|
||||
if (instance) {
|
||||
if (auto cmp = instance->getPackProfile()->getComponent("net.minecraft");
|
||||
cmp && cmp->getVersionFile() && cmp->getVersionFile()->type == "snapshot") {
|
||||
QMessageBox msgBox(this);
|
||||
msgBox.setText("Snapshots are currently not supported by CurseForge modpacks.");
|
||||
msgBox.exec();
|
||||
return;
|
||||
}
|
||||
ExportPackDialog dlg(std::move(instance), this, ModPlatform::ResourceProvider::FLAME);
|
||||
dlg.exec();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue