diff options
| author | Tannin <devnull@localhost> | 2014-12-09 18:09:11 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-12-09 18:09:11 +0100 |
| commit | acf35da699f2bb01900552323cc1983b7f065422 (patch) | |
| tree | 7b008104140d129223021390e1c575ff27aea97b /src/mainwindow.cpp | |
| parent | 6eb05396e4b2b58bc75ef4f79fddfd2355c265fa (diff) | |
now stored installed files with each mod
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<QString> &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<QString> 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"), |
