diff options
| author | Jeremy Rimpo <jrim@rimpo.org> | 2018-03-20 01:29:31 -0500 |
|---|---|---|
| committer | Jeremy Rimpo <jrim@rimpo.org> | 2018-03-20 01:29:31 -0500 |
| commit | 336216ba9a7e07aad972708c862c1e7306f1c67d (patch) | |
| tree | 0ef68ca7f429e289c7cb7fe45353f15cbd3bcd66 | |
| parent | b71d472e08701821a31c7ad48dcad04fe97b2d53 (diff) | |
Various save game improvements related to script extender files
* Improve handling of SE save transfers and deletes with main save
* Add indicator in save popup dialog if SE save file is present
| -rw-r--r-- | src/mainwindow.cpp | 12 | ||||
| -rw-r--r-- | src/transfersavesdialog.cpp | 30 |
2 files changed, 18 insertions, 24 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2bf25b05..8bb40072 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4667,9 +4667,13 @@ void MainWindow::on_bossButton_clicked() QStringList parameters;
parameters << "--game" << m_OrganizerCore.managedGame()->gameShortName()
- << "--gamePath" << QString("\"%1\"").arg(m_OrganizerCore.managedGame()->gameDirectory().absolutePath())
- << "--pluginListPath" << QString("\"%1/loadorder.txt\"").arg(m_OrganizerCore.profilePath())
- << "--out" << QString("\"%1\"").arg(outPath);
+ << "--gamePath" << QString("\"%1\"").arg(m_OrganizerCore.managedGame()->gameDirectory().absolutePath())
+ << "--out" << QString("\"%1\"").arg(outPath);
+
+ if (m_OrganizerCore.managedGame()->loadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime)
+ parameters << "--pluginListPath" << QString("\"%1/loadorder.txt\"").arg(m_OrganizerCore.profilePath());
+ else
+ parameters << "--pluginListPath" << QString("\"%1/plugins.txt\"").arg(m_OrganizerCore.profilePath());
if (m_DidUpdateMasterList) {
parameters << "--skipUpdateMasterlist";
@@ -4802,7 +4806,7 @@ void MainWindow::on_bossButton_clicked() // if the game specifies load order by file time, our own load order file needs to be removed because it's outdated.
// refreshESPList will then use the file time as the load order.
- if (m_OrganizerCore.managedGame()->loadOrderMechanism() == IPluginGame::LoadOrderMechanism::FileTime) {
+ if (m_OrganizerCore.managedGame()->loadOrderMechanism() != IPluginGame::LoadOrderMechanism::FileTime) {
qDebug("removing loadorder.txt");
QFile::remove(m_OrganizerCore.currentProfile()->getLoadOrderFileName());
}
diff --git a/src/transfersavesdialog.cpp b/src/transfersavesdialog.cpp index b8dda056..61dab6e5 100644 --- a/src/transfersavesdialog.cpp +++ b/src/transfersavesdialog.cpp @@ -74,6 +74,11 @@ public: return { m_File };
}
+ virtual bool hasScriptExtenderFile() const override
+ {
+ return false;
+ }
+
private:
QString m_File;
};
@@ -95,6 +100,11 @@ public: {
return nullptr;
}
+
+ virtual bool hasScriptExtenderSave(QString const &file) const override
+ {
+ return false;
+ }
};
} //end anonymous namespace
@@ -334,26 +344,6 @@ bool TransferSavesDialog::transferCharacters( sourceFile.absoluteFilePath().toUtf8().constData(),
destinationFile.toUtf8().constData());
}
-
- QFileInfo sourceFileSE(sourceFile.absolutePath() + "/" + sourceFile.completeBaseName() + "." + m_GamePlugin->savegameSEExtension());
- if (sourceFileSE.exists()) {
- QString destinationFileSE(destination.absoluteFilePath(sourceFileSE.fileName()));
-
- //If the file is already there, let them skip (or not).
- if (QFile::exists(destinationFileSE)) {
- if (!testOverwrite(overwriteMode, destinationFileSE)) {
- continue;
- }
- //OK, they want to remove it.
- QFile::remove(destinationFileSE);
- }
-
- if (!method(sourceFileSE.absoluteFilePath(), destinationFileSE)) {
- qCritical(errmsg,
- sourceFileSE.absoluteFilePath().toUtf8().constData(),
- destinationFileSE.toUtf8().constData());
- }
- }
}
}
return true;
|
