From 269d4f6765a3edcee4f9cf96c3d6a2330f0d683d Mon Sep 17 00:00:00 2001 From: Tannin Date: Mon, 17 Aug 2015 20:50:47 +0200 Subject: bugfix: wrong app ids used for oblivion and fallout 3 rewrote handling of different game variants: now resides in game plugin and works --- src/main.cpp | 13 +++++++++---- src/shared/fallout3info.cpp | 13 ------------- 2 files changed, 9 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 76474fd6..b83fde33 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -496,21 +496,26 @@ int main(int argc, char *argv[]) return 1; } + IPluginGame *game = organizer.managedGame(); + if (!settings.contains("game_edition")) { - std::vector editions = GameInfo::instance().getSteamVariants(); + QStringList editions = game->gameVariants(); if (editions.size() > 1) { SelectionDialog selection(QObject::tr("Please select the game edition you have (MO can't start the game correctly if this is set incorrectly!)"), nullptr); int index = 0; - for (auto iter = editions.begin(); iter != editions.end(); ++iter) { - selection.addChoice(ToQString(*iter), "", index++); + for (const QString &edition : editions) { + selection.addChoice(edition, "", index++); } if (selection.exec() == QDialog::Rejected) { return -1; } else { - settings.setValue("game_edition", selection.getChoiceData().toInt()); + settings.setValue("game_edition", selection.getChoiceString()); } } } + game->setGameVariant(settings.value("game_edition").toString()); + + #pragma message("edition isn't used?") qDebug("managing game at %s", qPrintable(QDir::toNativeSeparators(gamePath))); diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index 37238a2a..0b369b50 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -88,16 +88,6 @@ std::wstring Fallout3Info::getReferenceDataFile() return L"Fallout - Meshes.bsa"; } - - - -std::vector Fallout3Info::getSteamVariants() const -{ - return boost::assign::list_of(L"Regular")(L"Game Of The Year"); -} - - - std::wstring Fallout3Info::getNexusPage(bool nmmScheme) { if (nmmScheme) { @@ -107,19 +97,16 @@ std::wstring Fallout3Info::getNexusPage(bool nmmScheme) } } - std::wstring Fallout3Info::getNexusInfoUrlStatic() { return L"http://nmm.nexusmods.com/fallout3"; } - int Fallout3Info::getNexusModIDStatic() { return 16348; } - bool Fallout3Info::rerouteToProfile(const wchar_t *fileName, const wchar_t*) { static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr }; -- cgit v1.3.1