Skip to content

Commit

Permalink
UI|Client: Compatibility dialog loads most recent version
Browse files Browse the repository at this point in the history
If the wanted mod is missing but a different version is available, resolve the problem by trying to load the latest version of the mod.
  • Loading branch information
skyjake committed Oct 21, 2018
1 parent f1a5930 commit 08eb3f1
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions doomsday/apps/client/src/ui/dialogs/packagecompatibilitydialog.cpp
Expand Up @@ -172,7 +172,7 @@ DENG2_PIMPL(PackageCompatibilityDialog)
unavailNote +=
" - " _E(>) + Package::splitToHumanReadable(avail_expected.first) +
" " _E(l)_E(F) "\n(expected " +
avail_expected.second.asHumanReadableText() + _E(<) ")\n" _E(w)_E(A);
avail_expected.second.fullNumber() + _E(<) ")\n" _E(w)_E(A);
}
unavailNote += "\n";
}
Expand Down Expand Up @@ -311,9 +311,19 @@ DENG2_PIMPL(PackageCompatibilityDialog)
// Load the remaining wanted packages.
for (int i = goodUntil + 1; i < wanted.size(); ++i)
{
LOG_RES_MSG("Loading wanted ") << wanted.at(i);
const auto &pkgId = wanted.at(i);

pkgLoader.load(wanted.at(i));
if (pkgLoader.isAvailable(pkgId))
{
LOG_RES_MSG("Loading wanted ") << wanted.at(i);
pkgLoader.load(wanted.at(i));
}
else
{
auto id_ver = Package::split(pkgId);
LOG_RES_MSG("Loading latest version of wanted ") << id_ver.first;
pkgLoader.load(id_ver.first);
}
}

LOG_RES_MSG("Packages affecting gameplay:\n")
Expand Down

0 comments on commit 08eb3f1

Please sign in to comment.