diff options
| author | Jeremy Rimpo <jrim@rimpo.org> | 2017-12-13 03:11:03 -0600 |
|---|---|---|
| committer | Jeremy Rimpo <jrim@rimpo.org> | 2017-12-13 03:11:03 -0600 |
| commit | 083d1078753698b5ff347d91aa17219fd1e1cb5a (patch) | |
| tree | 17772176264e83d1147c804897bb82ae2a8efdca /src/modinfo.cpp | |
| parent | 2226a483d1415a315d7b558b0e2dc9919dfa858b (diff) | |
A number of improvements and fixes
* Move diagnostics tab to un-break tutorials targeting tab 3
* Restrict order locking for force-enabled plugins
* Cascade locked positions in the case of a conflict
* Should remove existing invalid locks
* Add some info to primary plugins in plugin list
* Differentiate plugin names for DLC and CC content
Diffstat (limited to 'src/modinfo.cpp')
| -rw-r--r-- | src/modinfo.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp index 77df6216..4f74086f 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -79,10 +79,11 @@ ModInfo::Ptr ModInfo::createFrom(const QDir &dir, DirectoryEntry **directoryStru ModInfo::Ptr ModInfo::createFromPlugin(const QString &modName, const QString &espName, const QStringList &bsaNames, + ModInfo::EModType modType, DirectoryEntry **directoryStructure) { QMutexLocker locker(&s_Mutex); ModInfo::Ptr result = ModInfo::Ptr( - new ModInfoForeign(modName, espName, bsaNames, directoryStructure)); + new ModInfoForeign(modName, espName, bsaNames, modType, directoryStructure)); s_Collection.push_back(result); return result; } @@ -224,9 +225,13 @@ void ModInfo::updateFromDisc(const QString &modDirectory, UnmanagedMods *unmanaged = game->feature<UnmanagedMods>(); if (unmanaged != nullptr) { for (const QString &modName : unmanaged->mods(!displayForeign)) { + ModInfo::EModType modType = game->DLCPlugins().contains(unmanaged->referenceFile(modName).fileName(), Qt::CaseInsensitive) ? ModInfo::EModType::MOD_DLC : + (game->CCPlugins().contains(unmanaged->referenceFile(modName).fileName(), Qt::CaseInsensitive) ? ModInfo::EModType::MOD_CC : ModInfo::EModType::MOD_DEFAULT); + createFromPlugin(unmanaged->displayName(modName), unmanaged->referenceFile(modName).absoluteFilePath(), unmanaged->secondaryFiles(modName), + modType, directoryStructure); } } |
