summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-08-17 20:50:47 +0200
committerTannin <devnull@localhost>2015-08-17 20:50:47 +0200
commit269d4f6765a3edcee4f9cf96c3d6a2330f0d683d (patch)
tree8448c3dd1957dc557e6fa34c2cdb3603fb7caf82 /src
parentea1c2b46fe0feb2ee7e027b6513b2f83c82720a5 (diff)
bugfix: wrong app ids used for oblivion and fallout 3
rewrote handling of different game variants: now resides in game plugin and works
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp13
-rw-r--r--src/shared/fallout3info.cpp13
2 files changed, 9 insertions, 17 deletions
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<std::wstring> 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<std::wstring> 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 };