Skip to content

Commit 9ee4c5a

Browse files
authored
Disable ESLs when no ESL support (ModOrganizer2#2026)
* Show ESL plugins but disable and warn if unsupported
1 parent a1d1991 commit 9ee4c5a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/pluginlist.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ void PluginList::refresh(const QString& profileName,
210210
bool forceDisabled =
211211
m_GamePlugin->loadOrderMechanism() == IPluginGame::LoadOrderMechanism::None &&
212212
!forceLoaded && !forceEnabled;
213+
if (!lightPluginsAreSupported && filename.endsWith(".esl")) {
214+
forceDisabled = true;
215+
}
213216

214217
bool archive = false;
215218
try {
@@ -1355,8 +1358,13 @@ QVariant PluginList::tooltipData(const QModelIndex& modelIndex) const
13551358
}
13561359

13571360
if (esp.forceDisabled) {
1358-
toolTip += "<br><br>" + tr("This game does not currently permit custom plugin "
1359-
"loading. There may be manual workarounds.");
1361+
if (m_GamePlugin->feature<GamePlugins>() && esp.hasLightExtension &&
1362+
!m_GamePlugin->feature<GamePlugins>()->lightPluginsAreSupported()) {
1363+
toolTip += "<br><br>" + tr("Light plugins (ESL) are not supported by this game.");
1364+
} else {
1365+
toolTip += "<br><br>" + tr("This game does not currently permit custom plugin "
1366+
"loading. There may be manual workarounds.");
1367+
}
13601368
}
13611369

13621370
// additional info
@@ -1804,7 +1812,7 @@ PluginList::ESPInfo::ESPInfo(const QString& name, bool forceLoaded, bool forceEn
18041812
ESP::File file(ToWString(fullPath));
18051813
auto extension = name.right(3).toLower();
18061814
hasMasterExtension = (extension == "esm");
1807-
hasLightExtension = lightSupported && (extension == "esl");
1815+
hasLightExtension = (extension == "esl");
18081816
isMasterFlagged = file.isMaster();
18091817
isOverlayFlagged = overlaySupported && file.isOverlay();
18101818
isLightFlagged =

0 commit comments

Comments
 (0)