aboutsummaryrefslogtreecommitdiff
path: root/libs/game_bethesda/src/games/skyrimse/skyrimseunmanagedmods.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/game_bethesda/src/games/skyrimse/skyrimseunmanagedmods.cpp')
-rw-r--r--libs/game_bethesda/src/games/skyrimse/skyrimseunmanagedmods.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/libs/game_bethesda/src/games/skyrimse/skyrimseunmanagedmods.cpp b/libs/game_bethesda/src/games/skyrimse/skyrimseunmanagedmods.cpp
new file mode 100644
index 0000000..da1fa02
--- /dev/null
+++ b/libs/game_bethesda/src/games/skyrimse/skyrimseunmanagedmods.cpp
@@ -0,0 +1,29 @@
+#include "skyrimseunmanagedmods.h"
+
+SkyrimSEUnmangedMods::SkyrimSEUnmangedMods(const GameGamebryo* game)
+ : GamebryoUnmangedMods(game)
+{}
+
+SkyrimSEUnmangedMods::~SkyrimSEUnmangedMods() {}
+
+QStringList SkyrimSEUnmangedMods::mods(bool onlyOfficial) const
+{
+ QStringList result;
+
+ QStringList pluginList = game()->primaryPlugins();
+ QStringList otherPlugins = game()->DLCPlugins();
+ otherPlugins.append(game()->CCPlugins());
+ for (QString plugin : otherPlugins) {
+ pluginList.removeAll(plugin);
+ }
+ QDir dataDir(game()->dataDirectory());
+ for (const QString& fileName : dataDir.entryList({"*.esp", "*.esl", "*.esm"})) {
+ if (!pluginList.contains(fileName, Qt::CaseInsensitive)) {
+ if (!onlyOfficial || pluginList.contains(fileName, Qt::CaseInsensitive)) {
+ result.append(fileName.chopped(4)); // trims the extension off
+ }
+ }
+ }
+
+ return result;
+}