diff options
| author | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2025-05-23 14:08:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-23 14:08:01 -0500 |
| commit | 3a8ea3cccee06397e90305e1e39a305f8b7c3cb3 (patch) | |
| tree | 6c16bf9825bf3f1613a8536d4702f24667fc4c80 /src/pluginlist.cpp | |
| parent | 5d766e94a7a3b3fa861d57d3ad6ae619d98dd5d8 (diff) | |
Oblivion Remastered Meta PR (#2241)
* Allow for mod directory maps
- Set main data files based on game
- Mapped mod directories to VFS
- Update overwrite setup
* Skip if mod contains no 'data' dir
* More mod directory compatibility fixes
* Workaround for Obl:Rem save location
- SLocalSavePath does nothing yet MO2 wants to use it to override the default save location
- This only applies to BGS games anyway, we should move this logic
* First pass for overwrite mod directory support
* More overwrite move / delete restrictions
* Fix issue with moving directories that are not required
* Formatting pass
* More modDataDirectory updates
* Formatting
---------
Co-authored-by: Mikaƫl Capelle <capelle.mikael@gmail.com>
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index fc468cef..62284543 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -147,10 +147,18 @@ void PluginList::highlightPlugins(const std::vector<unsigned int>& modIndices, for (auto& modIndex : modIndices) { ModInfo::Ptr selectedMod = ModInfo::getByIndex(modIndex); if (!selectedMod.isNull() && profile->modEnabled(modIndex)) { - QDir dir(selectedMod->absolutePath()); - QStringList plugins = dir.entryList(QStringList() << "*.esp" - << "*.esm" - << "*.esl"); + QString modDataPath = selectedMod->absolutePath(); + modDataPath = + m_Organizer.managedGame()->modDataDirectory().isEmpty() + ? modDataPath + : modDataPath + "/" + m_Organizer.managedGame()->modDataDirectory(); + QDir dir(modDataPath); + QStringList plugins; + if (dir.exists()) { + plugins = dir.entryList(QStringList() << "*.esp" + << "*.esm" + << "*.esl"); + } const MOShared::FilesOrigin& origin = directoryEntry.getOriginByName(selectedMod->internalName().toStdWString()); if (plugins.size() > 0) { |
