diff --git a/src/Core/Resource/Script/CScriptLayer.h b/src/Core/Resource/Script/CScriptLayer.h index 4bd8ae35..02c150a2 100644 --- a/src/Core/Resource/Script/CScriptLayer.h +++ b/src/Core/Resource/Script/CScriptLayer.h @@ -107,6 +107,9 @@ public: return iLyr; } + if (mpArea->GetGeneratorLayer() == this) + return mpArea->GetScriptLayerCount(); + return -1; } diff --git a/src/Editor/CStartWindow.cpp b/src/Editor/CStartWindow.cpp index 02003341..8808f72e 100644 --- a/src/Editor/CStartWindow.cpp +++ b/src/Editor/CStartWindow.cpp @@ -224,10 +224,10 @@ void CStartWindow::on_actionExtract_PAK_triggered() if (!Pak.isEmpty()) { - CPakToolDialog::EResult Result = CPakToolDialog::Extract(Pak); + CPakToolDialog::EResult Result = CPakToolDialog::Extract(Pak, 0, this); if (Result == CPakToolDialog::eSuccess) - Result = CPakToolDialog::DumpList(Pak); + Result = CPakToolDialog::DumpList(Pak, 0, this); if (Result == CPakToolDialog::eSuccess) QMessageBox::information(this, "Success", "Extracted pak successfully!"); diff --git a/src/Editor/WorldEditor/CWorldEditor.cpp b/src/Editor/WorldEditor/CWorldEditor.cpp index 4bfb2b27..72aacda9 100644 --- a/src/Editor/WorldEditor/CWorldEditor.cpp +++ b/src/Editor/WorldEditor/CWorldEditor.cpp @@ -371,7 +371,7 @@ bool CWorldEditor::SaveAndRepack() } QString PakOut; - CPakToolDialog::EResult Result = CPakToolDialog::Repack(CurrentGame(), mPakTarget, mPakFileList, mWorldDir, &PakOut); + CPakToolDialog::EResult Result = CPakToolDialog::Repack(CurrentGame(), mPakTarget, mPakFileList, mWorldDir, &PakOut, this); if (Result == CPakToolDialog::eError) QMessageBox::warning(this, "Error", "Failed to repack!");