summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/organizer_en.ts40
-rw-r--r--src/pluginlist.cpp26
-rw-r--r--src/pluginlist.h4
3 files changed, 45 insertions, 25 deletions
diff --git a/src/organizer_en.ts b/src/organizer_en.ts
index a73eaec0..18eaac8e 100644
--- a/src/organizer_en.ts
+++ b/src/organizer_en.ts
@@ -6007,92 +6007,92 @@ Continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="240"/>
+ <location filename="pluginlist.cpp" line="242"/>
<source>failed to update esp info for file %1 (source id: %2), error: %3</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="398"/>
+ <location filename="pluginlist.cpp" line="400"/>
<source>Plugin not found: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1222"/>
+ <location filename="pluginlist.cpp" line="1238"/>
<source>Origin</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1226"/>
+ <location filename="pluginlist.cpp" line="1242"/>
<source>This plugin can&apos;t be disabled (enforced by the game).</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1229"/>
+ <location filename="pluginlist.cpp" line="1245"/>
<source>Author</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1234"/>
+ <location filename="pluginlist.cpp" line="1250"/>
<source>Description</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1239"/>
+ <location filename="pluginlist.cpp" line="1255"/>
<source>Missing Masters</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1251"/>
+ <location filename="pluginlist.cpp" line="1267"/>
<source>Enabled Masters</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1257"/>
+ <location filename="pluginlist.cpp" line="1273"/>
<source>Loads Archives</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1261"/>
+ <location filename="pluginlist.cpp" line="1277"/>
<source>There are Archives connected to this plugin. Their assets will be added to your game, overwriting in case of conflicts following the plugin order. Loose files will always overwrite assets from Archives. (This flag only checks for Archives from the same mod as the plugin)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1270"/>
+ <location filename="pluginlist.cpp" line="1286"/>
<source>Loads INI settings</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1273"/>
+ <location filename="pluginlist.cpp" line="1289"/>
<source>There is an ini file connected to this plugin. Its settings will be added to your game settings, overwriting in case of conflicts.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1279"/>
+ <location filename="pluginlist.cpp" line="1295"/>
<source>This ESP is flagged as an ESL. It will adhere to the ESP load order but the records will be loaded in ESL space.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1311"/>
+ <location filename="pluginlist.cpp" line="1327"/>
<source>Incompatible with %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1317"/>
+ <location filename="pluginlist.cpp" line="1333"/>
<source>Depends on missing %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1325"/>
+ <location filename="pluginlist.cpp" line="1341"/>
<source>Warning</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1329"/>
+ <location filename="pluginlist.cpp" line="1345"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="1602"/>
+ <location filename="pluginlist.cpp" line="1618"/>
<source>failed to restore load order for %1</source>
<translation type="unfinished"></translation>
</message>
@@ -7421,12 +7421,12 @@ Destination:<byte value="xd"/>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="697"/>
+ <location filename="pluginlist.cpp" line="699"/>
<source>failed to access %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="pluginlist.cpp" line="711"/>
+ <location filename="pluginlist.cpp" line="713"/>
<source>failed to set file time %1</source>
<translation type="unfinished"></translation>
</message>
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp
index 6e54b46d..311f05ec 100644
--- a/src/pluginlist.cpp
+++ b/src/pluginlist.cpp
@@ -179,6 +179,8 @@ void PluginList::refresh(const QString& profileName,
GamePlugins* gamePlugins = m_GamePlugin->feature<GamePlugins>();
const bool lightPluginsAreSupported =
gamePlugins ? gamePlugins->lightPluginsAreSupported() : false;
+ const bool overridePluginsAreSupported =
+ gamePlugins ? gamePlugins->overridePluginsAreSupported() : false;
m_CurrentProfile = profileName;
@@ -233,7 +235,7 @@ void PluginList::refresh(const QString& profileName,
m_ESPs.push_back(ESPInfo(filename, forceEnabled, originName,
ToQString(current->getFullPath()), hasIni,
- loadedArchives, lightPluginsAreSupported));
+ loadedArchives, lightPluginsAreSupported, overridePluginsAreSupported));
m_ESPs.rbegin()->priority = -1;
} catch (const std::exception& e) {
reportError(
@@ -990,6 +992,16 @@ bool PluginList::isLightFlagged(const QString& name) const
}
}
+bool PluginList::isOverrideFlagged(const QString& name) const
+{
+ auto iter = m_ESPsByName.find(name);
+ if (iter == m_ESPsByName.end()) {
+ return false;
+ } else {
+ return m_ESPs[iter->second].isOverrideFlagged;
+ }
+}
+
boost::signals2::connection PluginList::onPluginStateChanged(
const std::function<void(const std::map<QString, PluginStates>&)>& func)
{
@@ -1049,6 +1061,8 @@ void PluginList::generatePluginIndexes()
GamePlugins* gamePlugins = m_GamePlugin->feature<GamePlugins>();
const bool lightPluginsSupported =
gamePlugins ? gamePlugins->lightPluginsAreSupported() : false;
+ const bool overridePluginsSupported =
+ gamePlugins ? gamePlugins->overridePluginsAreSupported() : false;
for (int l = 0; l < m_ESPs.size(); ++l) {
int i = m_ESPsByPriority.at(l);
@@ -1065,6 +1079,8 @@ void PluginList::generatePluginIndexes()
.arg((numESLs) % 4096, 3, 16, QChar('0'))
.toUpper();
++numESLs;
+ } else if (overridePluginsSupported && m_ESPs[i].isOverrideFlagged) {
+ m_ESPs[i].index = QString("");
} else {
m_ESPs[i].index =
QString("%1").arg(l - numESLs - numSkipped, 2, 16, QChar('0')).toUpper();
@@ -1705,7 +1721,7 @@ QModelIndex PluginList::parent(const QModelIndex&) const
PluginList::ESPInfo::ESPInfo(const QString& name, bool enabled,
const QString& originName, const QString& fullPath,
bool hasIni, std::set<QString> archives,
- bool lightPluginsAreSupported)
+ bool lightSupported, bool overrideSupported)
: name(name), fullPath(fullPath), enabled(enabled), forceEnabled(enabled),
priority(0), loadOrder(-1), originName(originName), hasIni(hasIni),
archives(archives.begin(), archives.end()), modSelected(false)
@@ -1714,9 +1730,10 @@ PluginList::ESPInfo::ESPInfo(const QString& name, bool enabled,
ESP::File file(ToWString(fullPath));
auto extension = name.right(3).toLower();
hasMasterExtension = (extension == "esm");
- hasLightExtension = lightPluginsAreSupported && (extension == "esl");
+ hasLightExtension = lightSupported && (extension == "esl");
isMasterFlagged = file.isMaster();
- isLightFlagged = lightPluginsAreSupported && file.isLight();
+ isOverrideFlagged = overrideSupported && file.isOverride();
+ isLightFlagged = lightSupported && !isOverrideFlagged && file.isLight(overrideSupported);
author = QString::fromLatin1(file.author().c_str());
description = QString::fromLatin1(file.description().c_str());
@@ -1729,6 +1746,7 @@ PluginList::ESPInfo::ESPInfo(const QString& name, bool enabled,
hasMasterExtension = false;
hasLightExtension = false;
isMasterFlagged = false;
+ isOverrideFlagged = false;
isLightFlagged = false;
}
}
diff --git a/src/pluginlist.h b/src/pluginlist.h
index e7a65c81..56f9e1a9 100644
--- a/src/pluginlist.h
+++ b/src/pluginlist.h
@@ -241,6 +241,7 @@ public:
bool hasLightExtension(const QString& name) const;
bool isMasterFlagged(const QString& name) const;
bool isLightFlagged(const QString& name) const;
+ bool isOverrideFlagged(const QString& name) const;
boost::signals2::connection onRefreshed(const std::function<void()>& callback);
boost::signals2::connection
@@ -314,7 +315,7 @@ private:
{
ESPInfo(const QString& name, bool enabled, const QString& originName,
const QString& fullPath, bool hasIni, std::set<QString> archives,
- bool lightSupported);
+ bool lightSupported, bool overrideSupported);
QString name;
QString fullPath;
@@ -329,6 +330,7 @@ private:
bool hasLightExtension;
bool isMasterFlagged;
bool isLightFlagged;
+ bool isOverrideFlagged;
bool modSelected;
QString author;
QString description;