Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit 3c443ca

Browse files
committed
Update following gamebryo updates for myGamesPath() in game feature.
1 parent 10a6432 commit 3c443ca

File tree

4 files changed

+9
-16
lines changed

4 files changed

+9
-16
lines changed

src/fallout4dataarchives.cpp

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

6-
Fallout4DataArchives::Fallout4DataArchives(const QDir& myGamesDir)
7-
: GamebryoDataArchives(myGamesDir)
8-
{}
9-
106
QStringList Fallout4DataArchives::vanillaArchives() const
117
{
128
return {"Fallout4 - Textures1.ba2", "Fallout4 - Textures2.ba2",
@@ -27,7 +23,7 @@ QStringList Fallout4DataArchives::archives(const MOBase::IProfile* profile) cons
2723

2824
QString iniFile = profile->localSettingsEnabled()
2925
? QDir(profile->absolutePath()).absoluteFilePath("fallout4.ini")
30-
: m_LocalGameDir.absoluteFilePath("fallout4.ini");
26+
: localGameDirectory().absoluteFilePath("fallout4.ini");
3127
result.append(getArchivesFromKey(iniFile, "SResourceArchiveList"));
3228
result.append(getArchivesFromKey(iniFile, "SResourceArchiveList2"));
3329

@@ -41,7 +37,7 @@ void Fallout4DataArchives::writeArchiveList(MOBase::IProfile* profile,
4137

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

src/fallout4dataarchives.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ class IProfile;
1313

1414
class Fallout4DataArchives : public GamebryoDataArchives
1515
{
16-
1716
public:
18-
Fallout4DataArchives(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_fallout4_en.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
<context>
55
<name>GameFallout4</name>
66
<message>
7-
<location filename="gamefallout4.cpp" line="91"/>
7+
<location filename="gamefallout4.cpp" line="94"/>
88
<source>Fallout 4 Support Plugin</source>
99
<translation type="unfinished"></translation>
1010
</message>
1111
<message>
12-
<location filename="gamefallout4.cpp" line="102"/>
12+
<location filename="gamefallout4.cpp" line="104"/>
1313
<source>Adds support for the game Fallout 4.
1414
Splash by %1</source>
1515
<translation type="unfinished"></translation>
1616
</message>
1717
<message>
18-
<location filename="gamefallout4.cpp" line="309"/>
18+
<location filename="gamefallout4.cpp" line="321"/>
1919
<source>sTestFile entries are present</source>
2020
<translation type="unfinished"></translation>
2121
</message>
2222
<message>
23-
<location filename="gamefallout4.cpp" line="316"/>
23+
<location filename="gamefallout4.cpp" line="329"/>
2424
<source>&lt;p&gt;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.&lt;/p&gt;</source>
2525
<translation type="unfinished"></translation>
2626
</message>

src/gamefallout4.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@ bool GameFallout4::init(IOrganizer* moInfo)
3737
return false;
3838
}
3939

40-
auto dataArchives = std::make_shared<Fallout4DataArchives>(myGamesPath());
40+
auto dataArchives = std::make_shared<Fallout4DataArchives>(this);
4141

4242
registerFeature(std::make_shared<Fallout4ScriptExtender>(this));
4343
registerFeature(dataArchives);
44-
registerFeature(
45-
std::make_shared<GamebryoLocalSavegames>(myGamesPath(), "fallout4custom.ini"));
44+
registerFeature(std::make_shared<GamebryoLocalSavegames>(this, "fallout4custom.ini"));
4645
registerFeature(std::make_shared<Fallout4ModDataChecker>(this));
4746
registerFeature(
4847
std::make_shared<Fallout4ModDataContent>(m_Organizer->gameFeatures()));

0 commit comments

Comments
 (0)