diff options
| author | Tannin <devnull@localhost> | 2014-06-08 15:10:08 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-06-08 15:10:08 +0200 |
| commit | 0feb4b702d8a9eb1465c79c49ada5de01b67083d (patch) | |
| tree | 378bba0b46c750f02f3f953e9f4076462a2633bf /src/modinfo.cpp | |
| parent | 5a4b6e70fd815c9052ff71a4244bdeb707e92ba1 (diff) | |
- loot client now only updates the masterlist once per MO session
- new event to notify plugins of changed mod priority
- overwrite now shows up in the "checked" category instead of "unchecked"
- display of "foreign" mods can now be limited to only official content
- bugfix: bsa extraction dialog showed up even if the plugin was disabled
- bugfix: after detection of foreign mods the priority of the overwrite folder could get messed up
- bugfix: when displaying only the context menu for the mod list as a whole, the menu didn't disappear
- bugfix: MO crashed when trying to download via the integrated browser
Diffstat (limited to 'src/modinfo.cpp')
| -rw-r--r-- | src/modinfo.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp index 87321b69..d58e83b2 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -184,7 +184,7 @@ unsigned int ModInfo::findMod(const boost::function<bool (ModInfo::Ptr)> &filter } -void ModInfo::updateFromDisc(const QString &modDirectory, DirectoryEntry **directoryStructure) +void ModInfo::updateFromDisc(const QString &modDirectory, DirectoryEntry **directoryStructure, bool displayForeign) { QMutexLocker lock(&s_Mutex); s_Collection.clear(); @@ -200,10 +200,13 @@ void ModInfo::updateFromDisc(const QString &modDirectory, DirectoryEntry **direc } { // list plugins in the data directory and make a foreign-managed mod out of each + std::vector<std::wstring> dlcPlugins = GameInfo::instance().getDLCPlugins(); QDir dataDir(QDir::fromNativeSeparators(ToQString(GameInfo::instance().getGameDirectory())) + "/data"); foreach (const QFileInfo &file, dataDir.entryInfoList(QStringList() << "*.esp" << "*.esm")) { - if ((file.baseName() != "Update") - && (file.baseName() != ToQString(GameInfo::instance().getGameName()))) { + if ((file.baseName() != "Update") // hide update + && (file.baseName() != ToQString(GameInfo::instance().getGameName())) // hide the game esp + && (displayForeign // show non-dlc bundles only if the user wants them + || std::find(dlcPlugins.begin(), dlcPlugins.end(), ToWString(file.fileName())) != dlcPlugins.end())) { QStringList archives; foreach (const QString archiveName, dataDir.entryList(QStringList() << file.baseName() + "*.bsa")) { archives.append(dataDir.absoluteFilePath(archiveName)); @@ -279,6 +282,12 @@ void ModInfo::setVersion(const VersionInfo &version) m_Version = version; } +bool ModInfo::hasFlag(ModInfo::EFlag flag) const +{ + std::vector<EFlag> flags = getFlags(); + return std::find(flags.begin(), flags.end(), flag) != flags.end(); +} + bool ModInfo::categorySet(int categoryID) const { |
