diff --git a/src/game_oblivion_en.ts b/src/game_oblivion_en.ts index ad614a8..80b1dbb 100644 --- a/src/game_oblivion_en.ts +++ b/src/game_oblivion_en.ts @@ -4,12 +4,12 @@ GameOblivion - + Oblivion Support Plugin - + Adds support for the game Oblivion diff --git a/src/gameoblivion.cpp b/src/gameoblivion.cpp index 537948d..3c52868 100644 --- a/src/gameoblivion.cpp +++ b/src/gameoblivion.cpp @@ -30,13 +30,12 @@ bool GameOblivion::init(IOrganizer* moInfo) return false; } - auto dataArchives = std::make_shared(myGamesPath()); + auto dataArchives = std::make_shared(this); registerFeature(std::make_shared(this)); registerFeature(dataArchives); registerFeature(std::make_shared(dataArchives.get(), this)); registerFeature(std::make_shared(this)); - registerFeature( - std::make_shared(myGamesPath(), "oblivion.ini")); + registerFeature(std::make_shared(this, "oblivion.ini")); registerFeature(std::make_shared(this)); registerFeature( std::make_shared(m_Organizer->gameFeatures())); diff --git a/src/obliviondataarchives.cpp b/src/obliviondataarchives.cpp index cb44de1..47c3dd4 100644 --- a/src/obliviondataarchives.cpp +++ b/src/obliviondataarchives.cpp @@ -1,10 +1,6 @@ #include "obliviondataarchives.h" #include -OblivionDataArchives::OblivionDataArchives(const QDir& myGamesDir) - : GamebryoDataArchives(myGamesDir) -{} - QStringList OblivionDataArchives::vanillaArchives() const { return {"Oblivion - Misc.bsa", "Oblivion - Textures - Compressed.bsa", @@ -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; @@ -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); } diff --git a/src/obliviondataarchives.h b/src/obliviondataarchives.h index a89e2c5..380f3ca 100644 --- a/src/obliviondataarchives.h +++ b/src/obliviondataarchives.h @@ -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;