From 43f86db6244ee8cf06b6a4154b6911c6cd898995 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Wed, 2 Oct 2024 10:54:48 -0500 Subject: [PATCH] Update CCC parsing to ignore duplicate plugins --- src/gamestarfield.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gamestarfield.cpp b/src/gamestarfield.cpp index dd012b2..ac1b15b 100644 --- a/src/gamestarfield.cpp +++ b/src/gamestarfield.cpp @@ -219,7 +219,11 @@ QStringList GameStarfield::primaryPlugins() const "SFBGS006.esm", "SFBGS007.esm", "SFBGS008.esm", "BlueprintShips-Starfield.esm"}; - plugins << CCCPlugins(); + for (auto plugin : CCCPlugins()) { + if (!plugins.contains(plugin, Qt::CaseInsensitive)) { + plugins.append(plugin); + } + } auto testPlugins = testFilePlugins(); if (loadOrderMechanism() == LoadOrderMechanism::None) { @@ -288,13 +292,10 @@ QStringList GameStarfield::CCCPlugins() const QByteArray line = file->readLine().trimmed(); QString modName; if ((line.size() > 0) && (line.at(0) != '#')) { - modName = QString::fromUtf8(line.constData()).toLower(); + modName = QString::fromUtf8(line.constData()); } - if (modName.size() > 0) { - if (!plugins.contains(modName, Qt::CaseInsensitive)) { - plugins.append(modName); - } + plugins.append(modName); } } }