From acf35da699f2bb01900552323cc1983b7f065422 Mon Sep 17 00:00:00 2001 From: Tannin Date: Tue, 9 Dec 2014 18:09:11 +0100 Subject: now stored installed files with each mod --- src/mainwindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 101c8f81..809da989 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2446,6 +2446,12 @@ IModInterface *MainWindow::createMod(GuessedValue &name) settingsFile.setValue("newestVersion", ""); settingsFile.setValue("category", 0); settingsFile.setValue("installationFile", ""); + + if (!merge) { + settingsFile.beginWriteArray("installedFiles", 0); + settingsFile.endArray(); + } + return ModInfo::createFrom(QDir(targetDirectory), &m_DirectoryStructure).data(); } @@ -4371,6 +4377,7 @@ void MainWindow::installDownload(int index) try { QString fileName = m_DownloadManager.getFilePath(index); int modID = m_DownloadManager.getModID(index); + int fileID = m_DownloadManager.getFileInfo(index)->fileID; GuessedValue modName; // see if there already are mods with the specified mod id @@ -4400,6 +4407,7 @@ void MainWindow::installDownload(int index) int modIndex = ModInfo::getIndex(modName); if (modIndex != UINT_MAX) { ModInfo::Ptr modInfo = ModInfo::getByIndex(modIndex); + modInfo->addInstalledFile(modID, fileID); if (hasIniTweaks && (QMessageBox::question(this, tr("Configure Mod"), -- cgit v1.3.1