Skip to content

Commit 50282b3

Browse files
authored
Update following gamebryo updates for myGamesPath() in game feature. (#27)
1 parent aee42b4 commit 50282b3

4 files changed

+7
-14
lines changed

src/fallout4vrdataarchives.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
#include "iprofile.h"
44
#include <utility.h>
55

6-
Fallout4VRDataArchives::Fallout4VRDataArchives(const QDir& myGamesDir)
7-
: GamebryoDataArchives(myGamesDir)
8-
{}
9-
106
QStringList Fallout4VRDataArchives::vanillaArchives() const
117
{
128
return {"Fallout4 - Textures1.ba2", "Fallout4 - Textures2.ba2",
@@ -28,7 +24,7 @@ QStringList Fallout4VRDataArchives::archives(const MOBase::IProfile* profile) co
2824

2925
QString iniFile = profile->localSettingsEnabled()
3026
? QDir(profile->absolutePath()).absoluteFilePath("fallout4.ini")
31-
: m_LocalGameDir.absoluteFilePath("fallout4.ini");
27+
: localGameDirectory().absoluteFilePath("fallout4.ini");
3228
result.append(getArchivesFromKey(iniFile, "SResourceArchiveList"));
3329
result.append(getArchivesFromKey(iniFile, "SResourceArchiveList2"));
3430

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

4339
QString iniFile = profile->localSettingsEnabled()
4440
? QDir(profile->absolutePath()).absoluteFilePath("fallout4.ini")
45-
: m_LocalGameDir.absoluteFilePath("fallout4.ini");
41+
: localGameDirectory().absoluteFilePath("fallout4.ini");
4642
if (list.length() > 255) {
4743
int splitIdx = list.lastIndexOf(",", 256);
4844
setArchivesToKey(iniFile, "SResourceArchiveList", list.mid(0, splitIdx));

src/fallout4vrdataarchives.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ class IProfile;
1313

1414
class Fallout4VRDataArchives : public GamebryoDataArchives
1515
{
16-
1716
public:
18-
Fallout4VRDataArchives(const QDir& myGamesDir);
17+
using GamebryoDataArchives::GamebryoDataArchives;
1918

20-
public:
2119
virtual QStringList vanillaArchives() const override;
2220
virtual QStringList archives(const MOBase::IProfile* profile) const override;
2321

src/game_fallout4vr_en.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
<context>
55
<name>GameFallout4VR</name>
66
<message>
7-
<location filename="gamefallout4vr.cpp" line="83"/>
7+
<location filename="gamefallout4vr.cpp" line="82"/>
88
<source>Fallout 4 VR Support Plugin</source>
99
<translation type="unfinished"></translation>
1010
</message>
1111
<message>
12-
<location filename="gamefallout4vr.cpp" line="94"/>
12+
<location filename="gamefallout4vr.cpp" line="92"/>
1313
<source>Adds support for the game Fallout 4 VR.
1414
Splash by %1</source>
1515
<translation type="unfinished"></translation>

src/gamefallout4vr.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ bool GameFallout4VR::init(IOrganizer* moInfo)
3535
return false;
3636
}
3737

38-
registerFeature(std::make_shared<Fallout4VRDataArchives>(myGamesPath()));
39-
registerFeature(
40-
std::make_shared<GamebryoLocalSavegames>(myGamesPath(), "fallout4custom.ini"));
38+
registerFeature(std::make_shared<Fallout4VRDataArchives>(this));
39+
registerFeature(std::make_shared<GamebryoLocalSavegames>(this, "fallout4custom.ini"));
4140
registerFeature(std::make_shared<Fallout4VRModDataChecker>(this));
4241
registerFeature(
4342
std::make_shared<Fallout4VRModDataContent>(m_Organizer->gameFeatures()));

0 commit comments

Comments
 (0)