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 03cd71b commit a449364
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/game_oblivion_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<context>
<name>GameOblivion</name>
<message>
<location filename="gameoblivion.cpp" line="80"/>
<location filename="gameoblivion.cpp" line="84"/>
<source>Oblivion Support Plugin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gameoblivion.cpp" line="90"/>
<location filename="gameoblivion.cpp" line="94"/>
<source>Adds support for the game Oblivion</source>
<translation type="unfinished"></translation>
</message>
Expand Down
5 changes: 2 additions & 3 deletions src/gameoblivion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ bool GameOblivion::init(IOrganizer* moInfo)
return false;
}

auto dataArchives = std::make_shared<OblivionDataArchives>(myGamesPath());
auto dataArchives = std::make_shared<OblivionDataArchives>(this);
registerFeature(std::make_shared<OblivionScriptExtender>(this));
registerFeature(dataArchives);
registerFeature(std::make_shared<OblivionBSAInvalidation>(dataArchives.get(), this));
registerFeature(std::make_shared<GamebryoSaveGameInfo>(this));
registerFeature(
std::make_shared<GamebryoLocalSavegames>(myGamesPath(), "oblivion.ini"));
registerFeature(std::make_shared<GamebryoLocalSavegames>(this, "oblivion.ini"));
registerFeature(std::make_shared<OblivionModDataChecker>(this));
registerFeature(
std::make_shared<OblivionModDataContent>(m_Organizer->gameFeatures()));
Expand Down
8 changes: 2 additions & 6 deletions src/obliviondataarchives.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#include "obliviondataarchives.h"
#include <utility.h>

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

QStringList OblivionDataArchives::vanillaArchives() const
{
return {"Oblivion - Misc.bsa", "Oblivion - Textures - Compressed.bsa",
Expand All @@ -18,7 +14,7 @@ QStringList OblivionDataArchives::archives(const MOBase::IProfile* profile) cons

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

return result;
Expand All @@ -31,6 +27,6 @@ void OblivionDataArchives::writeArchiveList(MOBase::IProfile* profile,

QString iniFile = profile->localSettingsEnabled()
? QDir(profile->absolutePath()).absoluteFilePath("oblivion.ini")
: m_LocalGameDir.absoluteFilePath("oblivion.ini");
: localGameDirectory().absoluteFilePath("oblivion.ini");
setArchivesToKey(iniFile, "SArchiveList", list);
}
4 changes: 1 addition & 3 deletions src/obliviondataarchives.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@

class OblivionDataArchives : public GamebryoDataArchives
{

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

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

Expand Down

0 comments on commit a449364

Please sign in to comment.