mirror of
https://github.com/ModOrganizer2/modorganizer.git
synced 2026-07-27 13:58:24 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec01532ecb | ||
|
|
3b5aeebb72 | ||
|
|
1929e5e57b | ||
|
|
cfe03a8561 | ||
|
|
164c6af962 | ||
|
|
c6874c1771 | ||
|
|
8fb36b0b28 | ||
|
|
8159a476cf | ||
|
|
0b9c96e845 | ||
|
|
6d73f9a18a | ||
|
|
5b855f2e19 | ||
|
|
21487ad8ee | ||
|
|
e78f46cc9e | ||
|
|
25cdbe3918 | ||
|
|
da4a013590 | ||
|
|
0b14cc4753 | ||
|
|
cee8d5ed72 | ||
|
|
0783eb373b | ||
|
|
feb411fb2a | ||
|
|
3b1ee9d43b | ||
|
|
3f9020ea4b | ||
|
|
b4bbb09cb5 | ||
|
|
9fdf3b759d |
+1
-1
@@ -232,7 +232,7 @@ void CategoryFactory::loadDefaultCategories()
|
||||
addCategory(44, "Equipment", { 1, 44 }, 43);
|
||||
addCategory(45, "Home/Settlement", { 1, 45 }, 43);
|
||||
addCategory(10, "Body, Face, & Hair", { 2, 17, 26 }, 0);
|
||||
addCategory(39, "Tattoos", { 1, 57 }, 10);
|
||||
addCategory(56, "Tattoos", { 1, 57 }, 10);
|
||||
addCategory(40, "Character Presets", { 1, 58 }, 0);
|
||||
addCategory(11, "Items", { 2, 27, 85 }, 0);
|
||||
addCategory(32, "Mercantile", { 2, 23, 69 }, 0);
|
||||
|
||||
+2
-1
@@ -359,7 +359,8 @@ void initLogging()
|
||||
log::getDefault().setCallback(
|
||||
[](log::Entry e){ LogModel::instance().add(e); });
|
||||
|
||||
log::getDefault().addToBlacklist(getenv("USERNAME"), "USERNAME");
|
||||
log::getDefault().addToBlacklist(std::string("\\") + getenv("USERNAME"), "\\USERNAME");
|
||||
log::getDefault().addToBlacklist(std::string("/") + getenv("USERNAME"), "/USERNAME");
|
||||
|
||||
qInstallMessageHandler(qtLogCallback);
|
||||
}
|
||||
|
||||
+1
-1
@@ -2939,7 +2939,7 @@ void MainWindow::nxmUpdatesAvailable(QString gameName, int modID, QVariant userD
|
||||
for (auto mod : modsList) {
|
||||
QString validNewVersion;
|
||||
int newModStatus = -1;
|
||||
QString installedFile = mod->installationFile();
|
||||
QString installedFile = QFileInfo(mod->installationFile()).fileName();
|
||||
|
||||
if (!installedFile.isEmpty()) {
|
||||
QVariantMap foundFileData;
|
||||
|
||||
+196
-85
@@ -62,27 +62,6 @@ using namespace MOBase;
|
||||
using namespace MOShared;
|
||||
|
||||
|
||||
static bool ByName(const PluginList::ESPInfo& LHS, const PluginList::ESPInfo& RHS)
|
||||
{
|
||||
return LHS.name.toUpper() < RHS.name.toUpper();
|
||||
}
|
||||
|
||||
static bool ByPriority(const PluginList::ESPInfo& LHS, const PluginList::ESPInfo& RHS)
|
||||
{
|
||||
if (LHS.isMaster && !RHS.isMaster) {
|
||||
return true;
|
||||
} else if (!LHS.isMaster && RHS.isMaster) {
|
||||
return false;
|
||||
} else {
|
||||
return LHS.priority < RHS.priority;
|
||||
}
|
||||
}
|
||||
|
||||
static bool ByDate(const PluginList::ESPInfo& LHS, const PluginList::ESPInfo& RHS)
|
||||
{
|
||||
return QFileInfo(LHS.fullPath).lastModified() < QFileInfo(RHS.fullPath).lastModified();
|
||||
}
|
||||
|
||||
static QString TruncateString(const QString& text)
|
||||
{
|
||||
QString new_text = text;
|
||||
@@ -272,6 +251,9 @@ void PluginList::refresh(const QString &profileName
|
||||
gamePlugins->readPluginLists(m_Organizer.managedGameOrganizer()->pluginList());
|
||||
}
|
||||
|
||||
fixPrimaryPlugins();
|
||||
fixPluginRelationships();
|
||||
|
||||
testMasters();
|
||||
|
||||
updateIndices();
|
||||
@@ -287,6 +269,84 @@ void PluginList::refresh(const QString &profileName
|
||||
m_Refreshed();
|
||||
}
|
||||
|
||||
void PluginList::fixPrimaryPlugins()
|
||||
{
|
||||
if (!m_Organizer.settings().game().forceEnableCoreFiles()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// This function ensures that the primary plugins are first and in the correct order
|
||||
QStringList primaryPlugins = m_Organizer.managedGame()->primaryPlugins();
|
||||
int prio = 0;
|
||||
bool somethingChanged = false;
|
||||
for (QString plugin : primaryPlugins) {
|
||||
std::map<QString, int>::iterator iter = m_ESPsByName.find(plugin);
|
||||
// Plugin is present?
|
||||
if (iter != m_ESPsByName.end()) {
|
||||
if (prio != m_ESPs[iter->second].priority) {
|
||||
// Priority is wrong! Fix it!
|
||||
int newPrio = prio;
|
||||
setPluginPriority(iter->second, newPrio, true /* isForced */);
|
||||
somethingChanged = true;
|
||||
}
|
||||
prio++;
|
||||
}
|
||||
}
|
||||
|
||||
if (somethingChanged) {
|
||||
writePluginsList();
|
||||
}
|
||||
}
|
||||
|
||||
void PluginList::fixPluginRelationships()
|
||||
{
|
||||
TimeThis timer("PluginList::fixPluginRelationships");
|
||||
|
||||
// Count the types of plugins
|
||||
int masterCount = 0;
|
||||
for (auto plugin : m_ESPs) {
|
||||
if (plugin.hasLightExtension ||
|
||||
plugin.hasMasterExtension ||
|
||||
plugin.isMasterFlagged) {
|
||||
masterCount++;
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure masters are up top and normal plugins are down below
|
||||
for (int i = 0; i < m_ESPs.size(); i++) {
|
||||
ESPInfo& plugin = m_ESPs[i];
|
||||
if (plugin.hasLightExtension ||
|
||||
plugin.hasMasterExtension ||
|
||||
plugin.isMasterFlagged) {
|
||||
if (plugin.priority > masterCount) {
|
||||
int newPriority = masterCount + 1;
|
||||
setPluginPriority(i, newPriority);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (plugin.priority < masterCount) {
|
||||
int newPriority = masterCount + 1;
|
||||
setPluginPriority(i, newPriority);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure master/child relationships are observed
|
||||
for (int i = 0; i < m_ESPs.size(); i++) {
|
||||
ESPInfo& plugin = m_ESPs[i];
|
||||
int newPriority = plugin.priority;
|
||||
for (auto master : plugin.masters) {
|
||||
auto iter = m_ESPsByName.find(master);
|
||||
if (iter != m_ESPsByName.end()) {
|
||||
newPriority = std::max(newPriority, m_ESPs[iter->second].priority);
|
||||
}
|
||||
}
|
||||
if (newPriority != plugin.priority) {
|
||||
setPluginPriority(i, newPriority);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PluginList::fixPriorities()
|
||||
{
|
||||
std::vector<std::pair<int, int>> espPrios;
|
||||
@@ -846,36 +906,6 @@ int PluginList::loadOrder(const QString &name) const
|
||||
}
|
||||
}
|
||||
|
||||
bool PluginList::isMaster(const QString &name) const
|
||||
{
|
||||
auto iter = m_ESPsByName.find(name);
|
||||
if (iter == m_ESPsByName.end()) {
|
||||
return false;
|
||||
} else {
|
||||
return m_ESPs[iter->second].isMaster;
|
||||
}
|
||||
}
|
||||
|
||||
bool PluginList::isLight(const QString &name) const
|
||||
{
|
||||
auto iter = m_ESPsByName.find(name);
|
||||
if (iter == m_ESPsByName.end()) {
|
||||
return false;
|
||||
} else {
|
||||
return m_ESPs[iter->second].isLight;
|
||||
}
|
||||
}
|
||||
|
||||
bool PluginList::isLightFlagged(const QString &name) const
|
||||
{
|
||||
auto iter = m_ESPsByName.find(name);
|
||||
if (iter == m_ESPsByName.end()) {
|
||||
return false;
|
||||
} else {
|
||||
return m_ESPs[iter->second].isLightFlagged;
|
||||
}
|
||||
}
|
||||
|
||||
QStringList PluginList::masters(const QString &name) const
|
||||
{
|
||||
auto iter = m_ESPsByName.find(name);
|
||||
@@ -900,6 +930,50 @@ QString PluginList::origin(const QString &name) const
|
||||
}
|
||||
}
|
||||
|
||||
bool PluginList::hasMasterExtension(const QString& name) const
|
||||
{
|
||||
auto iter = m_ESPsByName.find(name);
|
||||
if (iter == m_ESPsByName.end()) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return m_ESPs[iter->second].hasMasterExtension;
|
||||
}
|
||||
}
|
||||
|
||||
bool PluginList::hasLightExtension(const QString& name) const
|
||||
{
|
||||
auto iter = m_ESPsByName.find(name);
|
||||
if (iter == m_ESPsByName.end()) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return m_ESPs[iter->second].hasLightExtension;
|
||||
}
|
||||
}
|
||||
|
||||
bool PluginList::isMasterFlagged(const QString& name) const
|
||||
{
|
||||
auto iter = m_ESPsByName.find(name);
|
||||
if (iter == m_ESPsByName.end()) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return m_ESPs[iter->second].isMasterFlagged;
|
||||
}
|
||||
}
|
||||
|
||||
bool PluginList::isLightFlagged(const QString& name) const
|
||||
{
|
||||
auto iter = m_ESPsByName.find(name);
|
||||
if (iter == m_ESPsByName.end()) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return m_ESPs[iter->second].isLightFlagged;
|
||||
}
|
||||
}
|
||||
|
||||
boost::signals2::connection PluginList::onPluginStateChanged(const std::function<void(const std::map<QString, PluginStates>&)>& func)
|
||||
{
|
||||
return m_PluginStateChanged.connect(func);
|
||||
@@ -961,7 +1035,7 @@ void PluginList::generatePluginIndexes()
|
||||
++numSkipped;
|
||||
continue;
|
||||
}
|
||||
if (lightPluginsSupported && (m_ESPs[i].isLight || m_ESPs[i].isLightFlagged)) {
|
||||
if (lightPluginsSupported && (m_ESPs[i].hasLightExtension || m_ESPs[i].isLightFlagged)) {
|
||||
int ESLpos = 254 + ((numESLs + 1) / 4096);
|
||||
m_ESPs[i].index = QString("%1:%2").arg(ESLpos, 2, 16, QChar('0')).arg((numESLs) % 4096, 3, 16, QChar('0')).toUpper();
|
||||
++numESLs;
|
||||
@@ -1090,10 +1164,12 @@ QVariant PluginList::fontData(const QModelIndex &modelIndex) const
|
||||
|
||||
QFont result;
|
||||
|
||||
if (m_ESPs[index].isMaster) {
|
||||
if (m_ESPs[index].hasMasterExtension ||
|
||||
m_ESPs[index].isMasterFlagged ||
|
||||
m_ESPs[index].hasLightExtension) {
|
||||
result.setItalic(true);
|
||||
result.setWeight(QFont::Bold);
|
||||
} else if (m_ESPs[index].isLight || m_ESPs[index].isLightFlagged) {
|
||||
} else if (m_ESPs[index].isLightFlagged) {
|
||||
result.setItalic(true);
|
||||
}
|
||||
|
||||
@@ -1175,7 +1251,7 @@ QVariant PluginList::tooltipData(const QModelIndex &modelIndex) const
|
||||
"be added to your game settings, overwriting in case of conflicts.");
|
||||
}
|
||||
|
||||
if (esp.isLightFlagged && !esp.isLight) {
|
||||
if (esp.isLightFlagged && !esp.hasLightExtension) {
|
||||
toolTip +=
|
||||
"<br><br>" + tr(
|
||||
"This ESP is flagged as an ESL. It will adhere to the ESP load "
|
||||
@@ -1297,7 +1373,7 @@ QVariant PluginList::iconData(const QModelIndex &modelIndex) const
|
||||
result.append(":/MO/gui/archive_conflict_neutral");
|
||||
}
|
||||
|
||||
if (esp.isLightFlagged && !esp.isLight) {
|
||||
if (esp.isLightFlagged && !esp.hasLightExtension) {
|
||||
result.append(":/MO/gui/awaiting");
|
||||
}
|
||||
|
||||
@@ -1423,7 +1499,7 @@ Qt::ItemFlags PluginList::flags(const QModelIndex &modelIndex) const
|
||||
return result;
|
||||
}
|
||||
|
||||
void PluginList::setPluginPriority(int row, int &newPriority)
|
||||
void PluginList::setPluginPriority(int row, int &newPriority, bool isForced)
|
||||
{
|
||||
int newPriorityTemp = newPriority;
|
||||
|
||||
@@ -1433,18 +1509,22 @@ void PluginList::setPluginPriority(int row, int &newPriority)
|
||||
else if (newPriorityTemp >= static_cast<int>(m_ESPsByPriority.size()))
|
||||
newPriorityTemp = static_cast<int>(m_ESPsByPriority.size()) - 1;
|
||||
|
||||
if (!m_ESPs[row].isMaster && !m_ESPs[row].isLight) {
|
||||
if (!m_ESPs[row].isMasterFlagged &&
|
||||
!m_ESPs[row].hasLightExtension &&
|
||||
!m_ESPs[row].hasMasterExtension) {
|
||||
// don't allow esps to be moved above esms
|
||||
while ((newPriorityTemp < static_cast<int>(m_ESPsByPriority.size() - 1)) &&
|
||||
(m_ESPs.at(m_ESPsByPriority.at(newPriorityTemp)).isMaster ||
|
||||
m_ESPs.at(m_ESPsByPriority.at(newPriorityTemp)).isLight)) {
|
||||
(m_ESPs.at(m_ESPsByPriority.at(newPriorityTemp)).isMasterFlagged ||
|
||||
m_ESPs.at(m_ESPsByPriority.at(newPriorityTemp)).hasLightExtension ||
|
||||
m_ESPs.at(m_ESPsByPriority.at(newPriorityTemp)).hasMasterExtension)) {
|
||||
++newPriorityTemp;
|
||||
}
|
||||
} else {
|
||||
// don't allow esms to be moved below esps
|
||||
while ((newPriorityTemp > 0) &&
|
||||
!m_ESPs.at(m_ESPsByPriority.at(newPriorityTemp)).isMaster &&
|
||||
!m_ESPs.at(m_ESPsByPriority.at(newPriorityTemp)).isLight) {
|
||||
!m_ESPs.at(m_ESPsByPriority.at(newPriorityTemp)).isMasterFlagged &&
|
||||
!m_ESPs.at(m_ESPsByPriority.at(newPriorityTemp)).hasLightExtension &&
|
||||
!m_ESPs.at(m_ESPsByPriority.at(newPriorityTemp)).hasMasterExtension) {
|
||||
--newPriorityTemp;
|
||||
}
|
||||
// also don't allow "regular" esms to be moved above primary plugins
|
||||
@@ -1454,25 +1534,54 @@ void PluginList::setPluginPriority(int row, int &newPriority)
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
int oldPriority = m_ESPs.at(row).priority;
|
||||
if (newPriorityTemp > oldPriority) {
|
||||
// priority is higher than the old, so the gap we left is in lower priorities
|
||||
for (int i = oldPriority + 1; i <= newPriorityTemp; ++i) {
|
||||
--m_ESPs.at(m_ESPsByPriority.at(i)).priority;
|
||||
int oldPriority = m_ESPs.at(row).priority;
|
||||
if (newPriorityTemp < oldPriority) { // moving up
|
||||
// don't allow plugins to be moved above their masters
|
||||
for (auto master : m_ESPs[row].masters) {
|
||||
auto iter = m_ESPsByName.find(master);
|
||||
if (iter != m_ESPsByName.end()) {
|
||||
int masterPriority = m_ESPs[iter->second].priority;
|
||||
if (masterPriority >= newPriorityTemp)
|
||||
{
|
||||
newPriorityTemp = masterPriority + 1;
|
||||
}
|
||||
}
|
||||
emit dataChanged(index(oldPriority + 1, 0), index(newPriorityTemp, columnCount()));
|
||||
} else {
|
||||
for (int i = newPriorityTemp; i < oldPriority; ++i) {
|
||||
++m_ESPs.at(m_ESPsByPriority.at(i)).priority;
|
||||
}
|
||||
emit dataChanged(index(newPriorityTemp, 0), index(oldPriority - 1, columnCount()));
|
||||
++newPriority;
|
||||
}
|
||||
}
|
||||
else if (newPriorityTemp > oldPriority) { // moving down
|
||||
// don't allow masters to be moved below their children
|
||||
for (int i = oldPriority + 1; i <= newPriorityTemp; i++) {
|
||||
PluginList::ESPInfo* otherInfo = &m_ESPs.at(m_ESPsByPriority[i]);
|
||||
for (auto master : otherInfo->masters) {
|
||||
if (master.compare(m_ESPs[row].name, Qt::CaseInsensitive) == 0) {
|
||||
newPriorityTemp = otherInfo->priority - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_ESPs.at(row).priority = newPriorityTemp;
|
||||
emit dataChanged(index(row, 0), index(row, columnCount()));
|
||||
m_PluginMoved(m_ESPs[row].name, oldPriority, newPriorityTemp);
|
||||
try {
|
||||
if (newPriorityTemp != oldPriority) {
|
||||
if (newPriorityTemp > oldPriority) {
|
||||
// priority is higher than the old, so the gap we left is in lower priorities
|
||||
for (int i = oldPriority + 1; i <= newPriorityTemp; ++i) {
|
||||
--m_ESPs.at(m_ESPsByPriority.at(i)).priority;
|
||||
}
|
||||
emit dataChanged(index(oldPriority + 1, 0), index(newPriorityTemp, columnCount()));
|
||||
}
|
||||
else {
|
||||
for (int i = newPriorityTemp; i < oldPriority; ++i) {
|
||||
++m_ESPs.at(m_ESPsByPriority.at(i)).priority;
|
||||
}
|
||||
emit dataChanged(index(newPriorityTemp, 0), index(oldPriority - 1, columnCount()));
|
||||
++newPriority;
|
||||
}
|
||||
|
||||
m_ESPs.at(row).priority = newPriorityTemp;
|
||||
emit dataChanged(index(row, 0), index(row, columnCount()));
|
||||
m_PluginMoved(m_ESPs[row].name, oldPriority, newPriorityTemp);
|
||||
}
|
||||
} catch (const std::out_of_range&) {
|
||||
reportError(tr("failed to restore load order for %1").arg(m_ESPs[row].name));
|
||||
}
|
||||
@@ -1490,11 +1599,11 @@ void PluginList::changePluginPriority(std::vector<int> rows, int newPriority)
|
||||
|
||||
// don't try to move plugins before force-enabled plugins
|
||||
for (std::vector<ESPInfo>::const_iterator iter = m_ESPs.begin();
|
||||
iter != m_ESPs.end(); ++iter) {
|
||||
iter != m_ESPs.end(); ++iter) {
|
||||
if (iter->forceEnabled) {
|
||||
newPriority = std::max(newPriority, iter->priority+1);
|
||||
newPriority = std::max(newPriority, iter->priority + 1);
|
||||
}
|
||||
maxPriority = std::max(maxPriority, iter->priority+1);
|
||||
maxPriority = std::max(maxPriority, iter->priority + 1);
|
||||
minPriority = std::min(minPriority, iter->priority);
|
||||
}
|
||||
|
||||
@@ -1586,9 +1695,10 @@ PluginList::ESPInfo::ESPInfo(const QString &name, bool enabled,
|
||||
{
|
||||
try {
|
||||
ESP::File file(ToWString(fullPath));
|
||||
isMaster = file.isMaster();
|
||||
auto extension = name.right(3).toLower();
|
||||
isLight = lightPluginsAreSupported && (extension == "esl");
|
||||
hasMasterExtension = (extension == "esm");
|
||||
hasLightExtension = lightPluginsAreSupported && (extension == "esl");
|
||||
isMasterFlagged = file.isMaster();
|
||||
isLightFlagged = lightPluginsAreSupported && file.isLight();
|
||||
|
||||
author = QString::fromLatin1(file.author().c_str());
|
||||
@@ -1599,8 +1709,9 @@ PluginList::ESPInfo::ESPInfo(const QString &name, bool enabled,
|
||||
}
|
||||
} catch (const std::exception &e) {
|
||||
log::error("failed to parse plugin file {}: {}", fullPath, e.what());
|
||||
isMaster = false;
|
||||
isLight = false;
|
||||
hasMasterExtension = false;
|
||||
hasLightExtension = false;
|
||||
isMasterFlagged = false;
|
||||
isLightFlagged = false;
|
||||
}
|
||||
}
|
||||
|
||||
+11
-10
@@ -232,13 +232,15 @@ public:
|
||||
int priority(const QString &name) const;
|
||||
int loadOrder(const QString &name) const;
|
||||
bool setPriority(const QString& name, int newPriority);
|
||||
bool isMaster(const QString &name) const;
|
||||
bool isLight(const QString &name) const;
|
||||
bool isLightFlagged(const QString &name) const;
|
||||
QStringList masters(const QString &name) const;
|
||||
QString origin(const QString &name) const;
|
||||
void setLoadOrder(const QStringList& pluginList);
|
||||
|
||||
bool hasMasterExtension(const QString& name) const;
|
||||
bool hasLightExtension(const QString& name) const;
|
||||
bool isMasterFlagged(const QString& name) const;
|
||||
bool isLightFlagged(const QString& name) const;
|
||||
|
||||
boost::signals2::connection onRefreshed(const std::function<void()>& callback);
|
||||
boost::signals2::connection onPluginMoved(const std::function<void(const QString&, int, int)>& func);
|
||||
boost::signals2::connection onPluginStateChanged(const std::function<void (const std::map<QString, PluginStates>&)> &func);
|
||||
@@ -319,8 +321,9 @@ private:
|
||||
int loadOrder;
|
||||
FILETIME time;
|
||||
QString originName;
|
||||
bool isMaster;
|
||||
bool isLight;
|
||||
bool hasMasterExtension;
|
||||
bool hasLightExtension;
|
||||
bool isMasterFlagged;
|
||||
bool isLightFlagged;
|
||||
bool modSelected;
|
||||
QString author;
|
||||
@@ -341,10 +344,6 @@ private:
|
||||
Loot::Plugin loot;
|
||||
};
|
||||
|
||||
friend bool ByName(const ESPInfo& LHS, const ESPInfo& RHS);
|
||||
friend bool ByDate(const ESPInfo& LHS, const ESPInfo& RHS);
|
||||
friend bool ByPriority(const ESPInfo& LHS, const ESPInfo& RHS);
|
||||
|
||||
private:
|
||||
|
||||
void syncLoadOrder();
|
||||
@@ -353,12 +352,14 @@ private:
|
||||
void writeLockedOrder(const QString &fileName) const;
|
||||
|
||||
void readLockedOrderFrom(const QString &fileName);
|
||||
void setPluginPriority(int row, int &newPriority);
|
||||
void setPluginPriority(int row, int &newPriority, bool isForced=false);
|
||||
void changePluginPriority(std::vector<int> rows, int newPriority);
|
||||
|
||||
void testMasters();
|
||||
|
||||
void fixPrimaryPlugins();
|
||||
void fixPriorities();
|
||||
void fixPluginRelationships();
|
||||
|
||||
int findPluginByPriority(int priority);
|
||||
|
||||
|
||||
+21
-1
@@ -65,7 +65,7 @@ void PluginListProxy::setLoadOrder(const QStringList& pluginList)
|
||||
|
||||
bool PluginListProxy::isMaster(const QString& name) const
|
||||
{
|
||||
return m_Proxied->isMaster(name);
|
||||
return m_Proxied->isMasterFlagged(name);
|
||||
}
|
||||
|
||||
QStringList PluginListProxy::masters(const QString& name) const
|
||||
@@ -92,3 +92,23 @@ bool PluginListProxy::onPluginStateChanged(const std::function<void(const std::m
|
||||
{
|
||||
return m_PluginStateChanged.connect(func).connected();
|
||||
}
|
||||
|
||||
bool PluginListProxy::hasMasterExtension(const QString& name) const
|
||||
{
|
||||
return m_Proxied->hasMasterExtension(name);
|
||||
}
|
||||
|
||||
bool PluginListProxy::hasLightExtension(const QString& name) const
|
||||
{
|
||||
return m_Proxied->hasLightExtension(name);
|
||||
}
|
||||
|
||||
bool PluginListProxy::isMasterFlagged(const QString& name) const
|
||||
{
|
||||
return m_Proxied->isMasterFlagged(name);
|
||||
}
|
||||
|
||||
bool PluginListProxy::isLightFlagged(const QString& name) const
|
||||
{
|
||||
return m_Proxied->isLightFlagged(name);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ class OrganizerProxy;
|
||||
|
||||
class PluginListProxy : public MOBase::IPluginList
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
PluginListProxy(OrganizerProxy* oproxy, PluginList* pluginlist);
|
||||
@@ -21,13 +20,19 @@ public:
|
||||
bool setPriority(const QString& name, int newPriority) override;
|
||||
int loadOrder(const QString& name) const override;
|
||||
void setLoadOrder(const QStringList& pluginList) override;
|
||||
bool isMaster(const QString& name) const override;
|
||||
[[deprecated]] bool isMaster(const QString& name) const override;
|
||||
QStringList masters(const QString& name) const override;
|
||||
QString origin(const QString& name) const override;
|
||||
|
||||
bool onRefreshed(const std::function<void()>& callback) override;
|
||||
bool onPluginMoved(const std::function<void(const QString&, int, int)>& func) override;
|
||||
bool onPluginStateChanged(const std::function<void(const std::map<QString, PluginStates>&)>& func) override;
|
||||
|
||||
bool hasMasterExtension(const QString& name) const override;
|
||||
bool hasLightExtension(const QString& name) const override;
|
||||
bool isMasterFlagged(const QString& name) const override;
|
||||
bool isLightFlagged(const QString& name) const override;
|
||||
|
||||
private:
|
||||
|
||||
friend class OrganizerProxy;
|
||||
|
||||
@@ -71,12 +71,12 @@ void PluginListView::updatePluginCount()
|
||||
for (QString plugin : list->pluginNames()) {
|
||||
bool active = list->isEnabled(plugin);
|
||||
bool visible = m_sortProxy->filterMatchesPlugin(plugin);
|
||||
if (list->isLight(plugin) || list->isLightFlagged(plugin)) {
|
||||
if (list->hasLightExtension(plugin) || list->isLightFlagged(plugin)) {
|
||||
lightMasterCount++;
|
||||
activeLightMasterCount += active;
|
||||
activeVisibleCount += visible && active;
|
||||
}
|
||||
else if (list->isMaster(plugin)) {
|
||||
else if (list->hasMasterExtension(plugin) || list->isMasterFlagged(plugin)) {
|
||||
masterCount++;
|
||||
activeMasterCount += active;
|
||||
activeVisibleCount += visible && active;
|
||||
@@ -305,8 +305,7 @@ bool PluginListView::toggleSelectionState()
|
||||
|
||||
bool PluginListView::event(QEvent* event)
|
||||
{
|
||||
auto* profile = m_core->currentProfile();
|
||||
if (event->type() == QEvent::KeyPress && profile) {
|
||||
if (event->type() == QEvent::KeyPress) {
|
||||
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
|
||||
|
||||
if (keyEvent->modifiers() == Qt::ControlModifier
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -3,14 +3,14 @@
|
||||
// If VS_FF_PRERELEASE is not set, MO labels the build as a release and uses VER_FILEVERSION to determine version number.
|
||||
// Otherwise, if letters are used in VER_FILEVERSION_STR, uses the full MOBase::VersionInfo parser
|
||||
// Otherwise, uses the numbers from VER_FILEVERSION and sets the release type as pre-alpha
|
||||
#define VER_FILEVERSION 2,4,4
|
||||
#define VER_FILEVERSION_STR "2.4.4\0"
|
||||
#define VER_FILEVERSION 2,4,5
|
||||
#define VER_FILEVERSION_STR "2.4.5alpha3\0"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_FILEVERSION
|
||||
PRODUCTVERSION VER_FILEVERSION
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS (0)
|
||||
FILEFLAGS VS_FF_PRERELEASE
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE (0)
|
||||
@@ -24,7 +24,7 @@ BEGIN
|
||||
VALUE "FileDescription", "Mod Organizer 2 GUI\0"
|
||||
VALUE "OriginalFilename", "ModOrganizer.exe\0"
|
||||
VALUE "InternalName", "ModOrganizer2\0"
|
||||
VALUE "LegalCopyright", "Copyright 2011-2016 Sebastian Herbord\r\nCopyright 2016-2021 Mod Organizer 2 contributors\0"
|
||||
VALUE "LegalCopyright", "Copyright 2011-2016 Sebastian Herbord\r\nCopyright 2016-2022 Mod Organizer 2 contributors\0"
|
||||
VALUE "ProductName", "Mod Organizer 2\0"
|
||||
VALUE "ProductVersion", VER_FILEVERSION_STR
|
||||
END
|
||||
|
||||
Reference in New Issue
Block a user