summaryrefslogtreecommitdiff
path: root/src/profile.cpp
diff options
context:
space:
mode:
authorChris Bessent <lost.dragonist@gmail.com>2021-01-18 07:55:02 -0700
committerChris Bessent <lost.dragonist@gmail.com>2021-01-18 07:55:02 -0700
commit4c64448947e624fa0a8e7025499cb889d272d232 (patch)
tree7a995b0117fbfc2c57ea94c0be99f03ec7f24a99 /src/profile.cpp
parent9f96a88989395acb702ffc6f34a6928cb81be97a (diff)
Add a warning about overwrite mods being disabled
Diffstat (limited to 'src/profile.cpp')
-rw-r--r--src/profile.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/profile.cpp b/src/profile.cpp
index 3cc1a2a3..f8fc3eb9 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -382,6 +382,8 @@ void Profile::refreshModStatus()
std::set<QString> namesRead;
+ bool warnAboutOverwrite = false;
+
// load mods from file and update enabled state and priority for them
int index = 0;
while (!file.atEnd()) {
@@ -405,6 +407,9 @@ void Profile::refreshModStatus()
}
if (modName.size() > 0) {
QString lookupName = modName;
+ if (modName.compare("overwrite", Qt::CaseInsensitive) == 0) {
+ warnAboutOverwrite = true;
+ }
if (namesRead.find(lookupName) != namesRead.end()) {
continue;
} else {
@@ -486,6 +491,19 @@ void Profile::refreshModStatus()
file.close();
updateIndices();
+
+ // User has a mod named some variation of "overwrite". Tell them about it.
+ if (warnAboutOverwrite) {
+ QMessageBox::warning(
+ nullptr,
+ tr("Overwrite mod conflict"),
+ tr("At least one mod named \"overwrite\" was detected, disabled, and moved to the lowest priority on the mod list. "
+ "You may want to rename this mod and enable it again.")
+ );
+ // also, mark the mod-list as changed
+ modStatusModified = true;
+ }
+
if (modStatusModified) {
m_ModListWriter.write();
}