Skip to content

Commit

Permalink
Add Low Violence variant
Browse files Browse the repository at this point in the history
  • Loading branch information
Liderate committed Dec 11, 2024
1 parent c11ae5d commit 89282d0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/gamefallout3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ bool GameFallout3::init(IOrganizer* moInfo)

void GameFallout3::checkVariants()
{
if (QFile::exists(m_GamePath + "/Galaxy.dll")) {
if (QFile::exists(m_GamePath + "/Fallout3ng.exe")) {
setGameVariant("Low Violence");
} else if (QFile::exists(m_GamePath + "/Galaxy.dll")) {
setGameVariant("GOG");
} else if (QFile::exists(m_GamePath + "/FalloutLauncherEpic.exe")) {
setGameVariant("Epic Games");
Expand Down Expand Up @@ -214,7 +216,17 @@ QStringList GameFallout3::primaryPlugins() const

QStringList GameFallout3::gameVariants() const
{
return {"Steam (Regular)", "Steam (Game Of The Year)", "Epic Games", "GOG"};
return {"Steam (Regular)", "Steam (Game Of The Year)", "Epic Games", "GOG",
"Low Violence"};
}

QString GameFallout3::binaryName() const
{
if (selectedVariant() == "Low Violence") {
return "Fallout3ng.exe";
} else {
return GameGamebryo::binaryName();
}
}

QString GameFallout3::gameShortName() const
Expand Down Expand Up @@ -260,7 +272,8 @@ QString GameFallout3::getLauncherName() const
{"Steam (Regular)", "Fallout3Launcher.exe"},
{"Steam (Game of the Year)", "Fallout3Launcher.exe"},
{"Epic Games", "FalloutLauncherEpic.exe"},
{"GOG", "FalloutLauncher.exe"}};
{"GOG", "FalloutLauncher.exe"},
{"Low Violence", "Fallout3Launcher.exe"}};

return names.value(selectedVariant());
}
1 change: 1 addition & 0 deletions src/gamefallout3.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GameFallout3 : public GameGamebryo
virtual QString steamAPPId() const override;
virtual QStringList primaryPlugins() const override;
virtual QStringList gameVariants() const;
QString binaryName() const override;
virtual QString gameShortName() const override;
virtual QStringList validShortNames() const override;
virtual QString gameNexusName() const override;
Expand Down

0 comments on commit 89282d0

Please sign in to comment.