summaryrefslogtreecommitdiff
path: root/src/profile.cpp
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2021-01-18 21:16:55 +0100
committerGitHub <noreply@github.com>2021-01-18 21:16:55 +0100
commit339457f79d802070c36d8cc95f286b941455e789 (patch)
tree45c47f12bea9e6cb81537b9a10fd1e9135799303 /src/profile.cpp
parentee44a38c986d953a19cbb37b0297590844cf54ac (diff)
parent4c64448947e624fa0a8e7025499cb889d272d232 (diff)
Merge pull request #1366 from LostDragonist/mod_casing
Make modlist.txt less case sensitive
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 695cd3ae..029265e2 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -381,6 +381,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()) {
@@ -404,6 +406,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 {
@@ -485,6 +490,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();
}