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