diff options
| author | Jeremy Rimpo <jrim@rimpo.org> | 2023-10-08 04:17:07 -0500 |
|---|---|---|
| committer | Jeremy Rimpo <jrim@rimpo.org> | 2023-10-08 04:17:07 -0500 |
| commit | 028c8eafa982a5b126544f733880dd7711e0786a (patch) | |
| tree | 576f522936c2efe121cc181729842ecd7931c174 /src/pluginlist.cpp | |
| parent | 48e8fdff0df30fa807e61d4df7b6116a9d190f2f (diff) | |
Additional overlay plugin support
* Add isOverlayFlagged to IPluginList
* Further notate plugin list
* Rename to match xEdit / Wrye / LOOT
* Update counter
Diffstat (limited to 'src/pluginlist.cpp')
| -rw-r--r-- | src/pluginlist.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp index 7b732af8..489e312b 100644 --- a/src/pluginlist.cpp +++ b/src/pluginlist.cpp @@ -1006,13 +1006,13 @@ bool PluginList::isLightFlagged(const QString& name) const } } -bool PluginList::isOverrideFlagged(const QString& name) const +bool PluginList::isOverlayFlagged(const QString& name) const { auto iter = m_ESPsByName.find(name); if (iter == m_ESPsByName.end()) { return false; } else { - return m_ESPs[iter->second].isOverrideFlagged; + return m_ESPs[iter->second].isOverlayFlagged; } } @@ -1093,7 +1093,7 @@ void PluginList::generatePluginIndexes() .arg((numESLs) % 4096, 3, 16, QChar('0')) .toUpper(); ++numESLs; - } else if (overridePluginsSupported && m_ESPs[i].isOverrideFlagged) { + } else if (overridePluginsSupported && m_ESPs[i].isOverlayFlagged) { m_ESPs[i].index = QString(""); ++numSkipped; } else { @@ -1233,6 +1233,8 @@ QVariant PluginList::fontData(const QModelIndex& modelIndex) const result.setWeight(QFont::Bold); } else if (m_ESPs[index].isLightFlagged) { result.setItalic(true); + } else if (m_ESPs[index].isOverlayFlagged) { + result.setUnderline(true); } return result; @@ -1327,6 +1329,13 @@ QVariant PluginList::tooltipData(const QModelIndex& modelIndex) const .arg(type); } + if (esp.isOverlayFlagged) { + toolTip += + "<br><br>" + tr("This plugin is flagged as an overlay plugin. It contains only " + "modified records and will overlay those changes onto the " + "existing records in memory. It takes no memory space."); + } + if (esp.forceDisabled) { toolTip += "<br><br>" + tr("This game does not currently permit custom plugin " "loading. There may be manual workarounds."); @@ -1447,6 +1456,10 @@ QVariant PluginList::iconData(const QModelIndex& modelIndex) const result.append(":/MO/gui/awaiting"); } + if (esp.isOverlayFlagged) { + result.append(":/MO/gui/instance_switch"); + } + if (info && !info->loot.dirty.empty()) { result.append(":/MO/gui/edit_clear"); } @@ -1759,7 +1772,7 @@ PluginList::ESPInfo::ESPInfo(const QString& name, bool forceLoaded, bool forceEn bool forceDisabled, const QString& originName, const QString& fullPath, bool hasIni, std::set<QString> archives, bool lightSupported, - bool overrideSupported) + bool overlaySupported) : name(name), fullPath(fullPath), enabled(forceLoaded), forceLoaded(forceLoaded), forceEnabled(forceEnabled), forceDisabled(forceDisabled), priority(0), loadOrder(-1), originName(originName), hasIni(hasIni), @@ -1771,9 +1784,9 @@ PluginList::ESPInfo::ESPInfo(const QString& name, bool forceLoaded, bool forceEn hasMasterExtension = (extension == "esm"); hasLightExtension = lightSupported && (extension == "esl"); isMasterFlagged = file.isMaster(); - isOverrideFlagged = overrideSupported && file.isOverride(); + isOverlayFlagged = overlaySupported && file.isOverlay(); isLightFlagged = - lightSupported && !isOverrideFlagged && file.isLight(overrideSupported); + lightSupported && !isOverlayFlagged && file.isLight(overlaySupported); author = QString::fromLatin1(file.author().c_str()); description = QString::fromLatin1(file.description().c_str()); @@ -1786,7 +1799,7 @@ PluginList::ESPInfo::ESPInfo(const QString& name, bool forceLoaded, bool forceEn hasMasterExtension = false; hasLightExtension = false; isMasterFlagged = false; - isOverrideFlagged = false; + isOverlayFlagged = false; isLightFlagged = false; } } |
