diff options
Diffstat (limited to 'libs/game_bethesda/src/games/enderalse/enderalseunmanagedmods.cpp')
| -rw-r--r-- | libs/game_bethesda/src/games/enderalse/enderalseunmanagedmods.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libs/game_bethesda/src/games/enderalse/enderalseunmanagedmods.cpp b/libs/game_bethesda/src/games/enderalse/enderalseunmanagedmods.cpp new file mode 100644 index 0000000..9f11b44 --- /dev/null +++ b/libs/game_bethesda/src/games/enderalse/enderalseunmanagedmods.cpp @@ -0,0 +1,29 @@ +#include "enderalseunmanagedmods.h" + +EnderalSEUnmangedMods::EnderalSEUnmangedMods(const GameGamebryo* game) + : GamebryoUnmangedMods(game) +{} + +EnderalSEUnmangedMods::~EnderalSEUnmangedMods() {} + +QStringList EnderalSEUnmangedMods::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; +} |
