summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorSilarn <jrim@rimpo.org>2018-05-04 11:35:44 -0500
committerSilarn <jrim@rimpo.org>2018-05-04 11:35:44 -0500
commit54e219759283c4805f40c03d2215831081f55d51 (patch)
treefafe8beafdbb4209e2eb74ecfcdeb2da4012eb34 /src/mainwindow.cpp
parent0d7460996ae92c59f78cd2b5ccac43a1bf8869b2 (diff)
Allow update processor to include the managed game if nexus info matches
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 2aaf7f59..2830c776 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -4274,13 +4274,21 @@ void MainWindow::nxmUpdatesAvailable(const std::vector<int> &modIDs, QVariant us
}
} else {
QString gameName = m_OrganizerCore.managedGame()->gameShortName();
+ bool sameNexus = false;
for (IPluginGame *game : m_PluginContainer.plugins<IPluginGame>()) {
if (game->nexusGameID() == result["game_id"].toInt()) {
gameName = game->gameShortName();
+ if (game->nexusGameID() == m_OrganizerCore.managedGame()->nexusGameID())
+ sameNexus = true;
break;
}
}
std::vector<ModInfo::Ptr> info = ModInfo::getByModID(gameName, result["id"].toInt());
+ if (sameNexus) {
+ std::vector<ModInfo::Ptr> mainInfo = ModInfo::getByModID(m_OrganizerCore.managedGame()->gameShortName(), result["id"].toInt());
+ info.reserve(info.size() + mainInfo.size());
+ info.insert(info.end(), mainInfo.begin(), mainInfo.end());
+ }
for (auto iter = info.begin(); iter != info.end(); ++iter) {
(*iter)->setNewestVersion(result["version"].toString());
(*iter)->setNexusDescription(result["description"].toString());