From 4751eb76caa8534085250fe609934e7863e81405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Sun, 28 Jul 2024 13:03:02 +0200 Subject: [PATCH] Add settings to allow downloads from Fallout 4 London. --- src/game_fallout4_en.ts | 8 ++++---- src/gamefallout4.cpp | 12 +++++++++++- src/gamefallout4.h | 1 + 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/game_fallout4_en.ts b/src/game_fallout4_en.ts index 1c57784..8ff0be3 100644 --- a/src/game_fallout4_en.ts +++ b/src/game_fallout4_en.ts @@ -4,23 +4,23 @@ GameFallout4 - + Fallout 4 Support Plugin - + Adds support for the game Fallout 4. Splash by %1 - + sTestFile entries are present - + <p>You have sTestFile settings in your Fallout4Custom.ini. These must be removed or the game will not read the plugins.txt file. Management is disabled.</p> diff --git a/src/gamefallout4.cpp b/src/gamefallout4.cpp index be94e72..c5f206a 100644 --- a/src/gamefallout4.cpp +++ b/src/gamefallout4.cpp @@ -113,7 +113,8 @@ MOBase::VersionInfo GameFallout4::version() const QList GameFallout4::settings() const { - return QList(); + return {PluginSetting("fo4london_downloads", "allow Fallout London downloads", + QVariant(false))}; } MappingType GameFallout4::mappings() const @@ -227,6 +228,15 @@ QString GameFallout4::gameNexusName() const return "fallout4"; } +QStringList GameFallout4::validShortNames() const +{ + QStringList shortNames{"Fallout4"}; + if (m_Organizer->pluginSetting(name(), "fo4london_downloads").toBool()) { + shortNames.append("Fallout4London"); + } + return shortNames; +} + QStringList GameFallout4::iniFiles() const { return {"fallout4.ini", "fallout4prefs.ini", "fallout4custom.ini"}; diff --git a/src/gamefallout4.h b/src/gamefallout4.h index 7fc6271..94f4b3e 100644 --- a/src/gamefallout4.h +++ b/src/gamefallout4.h @@ -34,6 +34,7 @@ class GameFallout4 : public GameGamebryo, public MOBase::IPluginDiagnose virtual QStringList gameVariants() const override; virtual QString gameShortName() const override; virtual QString gameNexusName() const override; + virtual QStringList validShortNames() const override; virtual QStringList iniFiles() const override; virtual QStringList DLCPlugins() const override; virtual QStringList CCPlugins() const override;