Skip to content

Commit

Permalink
Update following gamebryo updates for myGamesPath() in game feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Jun 14, 2024
1 parent aee42b4 commit 26f3a90
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
8 changes: 2 additions & 6 deletions src/fallout4vrdataarchives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
#include "iprofile.h"
#include <utility.h>

Fallout4VRDataArchives::Fallout4VRDataArchives(const QDir& myGamesDir)
: GamebryoDataArchives(myGamesDir)
{}

QStringList Fallout4VRDataArchives::vanillaArchives() const
{
return {"Fallout4 - Textures1.ba2", "Fallout4 - Textures2.ba2",
Expand All @@ -28,7 +24,7 @@ QStringList Fallout4VRDataArchives::archives(const MOBase::IProfile* profile) co

QString iniFile = profile->localSettingsEnabled()
? QDir(profile->absolutePath()).absoluteFilePath("fallout4.ini")
: m_LocalGameDir.absoluteFilePath("fallout4.ini");
: localGameDirectory().absoluteFilePath("fallout4.ini");
result.append(getArchivesFromKey(iniFile, "SResourceArchiveList"));
result.append(getArchivesFromKey(iniFile, "SResourceArchiveList2"));

Expand All @@ -42,7 +38,7 @@ void Fallout4VRDataArchives::writeArchiveList(MOBase::IProfile* profile,

QString iniFile = profile->localSettingsEnabled()
? QDir(profile->absolutePath()).absoluteFilePath("fallout4.ini")
: m_LocalGameDir.absoluteFilePath("fallout4.ini");
: localGameDirectory().absoluteFilePath("fallout4.ini");
if (list.length() > 255) {
int splitIdx = list.lastIndexOf(",", 256);
setArchivesToKey(iniFile, "SResourceArchiveList", list.mid(0, splitIdx));
Expand Down
4 changes: 1 addition & 3 deletions src/fallout4vrdataarchives.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ class IProfile;

class Fallout4VRDataArchives : public GamebryoDataArchives
{

public:
Fallout4VRDataArchives(const QDir& myGamesDir);
using GamebryoDataArchives::GamebryoDataArchives;

public:
virtual QStringList vanillaArchives() const override;
virtual QStringList archives(const MOBase::IProfile* profile) const override;

Expand Down
4 changes: 2 additions & 2 deletions src/game_fallout4vr_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<context>
<name>GameFallout4VR</name>
<message>
<location filename="gamefallout4vr.cpp" line="83"/>
<location filename="gamefallout4vr.cpp" line="82"/>
<source>Fallout 4 VR Support Plugin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gamefallout4vr.cpp" line="94"/>
<location filename="gamefallout4vr.cpp" line="92"/>
<source>Adds support for the game Fallout 4 VR.
Splash by %1</source>
<translation type="unfinished"></translation>
Expand Down
5 changes: 2 additions & 3 deletions src/gamefallout4vr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ bool GameFallout4VR::init(IOrganizer* moInfo)
return false;
}

registerFeature(std::make_shared<Fallout4VRDataArchives>(myGamesPath()));
registerFeature(
std::make_shared<GamebryoLocalSavegames>(myGamesPath(), "fallout4custom.ini"));
registerFeature(std::make_shared<Fallout4VRDataArchives>(this));
registerFeature(std::make_shared<GamebryoLocalSavegames>(this, "fallout4custom.ini"));
registerFeature(std::make_shared<Fallout4VRModDataChecker>(this));
registerFeature(
std::make_shared<Fallout4VRModDataContent>(m_Organizer->gameFeatures()));
Expand Down

0 comments on commit 26f3a90

Please sign in to comment.