diff --git a/src/falloutnvdataarchives.cpp b/src/falloutnvdataarchives.cpp index b9f8359..7314561 100644 --- a/src/falloutnvdataarchives.cpp +++ b/src/falloutnvdataarchives.cpp @@ -1,10 +1,6 @@ #include "falloutnvdataarchives.h" #include -FalloutNVDataArchives::FalloutNVDataArchives(const QDir& myGamesDir) - : GamebryoDataArchives(myGamesDir) -{} - QStringList FalloutNVDataArchives::vanillaArchives() const { return {"Fallout - Textures.bsa", "Fallout - Textures2.bsa", "Fallout - Meshes.bsa", @@ -17,7 +13,7 @@ QStringList FalloutNVDataArchives::archives(const MOBase::IProfile* profile) con QString iniFile = profile->localSettingsEnabled() ? QDir(profile->absolutePath()).absoluteFilePath("fallout.ini") - : m_LocalGameDir.absoluteFilePath("fallout.ini"); + : localGameDirectory().absoluteFilePath("fallout.ini"); result.append(getArchivesFromKey(iniFile, "SArchiveList", 8192)); // NVAC expands the maximum string limit @@ -31,6 +27,6 @@ void FalloutNVDataArchives::writeArchiveList(MOBase::IProfile* profile, QString iniFile = profile->localSettingsEnabled() ? QDir(profile->absolutePath()).absoluteFilePath("fallout.ini") - : m_LocalGameDir.absoluteFilePath("fallout.ini"); + : localGameDirectory().absoluteFilePath("fallout.ini"); setArchivesToKey(iniFile, "SArchiveList", list); } diff --git a/src/falloutnvdataarchives.h b/src/falloutnvdataarchives.h index 8b7ca21..07e64a1 100644 --- a/src/falloutnvdataarchives.h +++ b/src/falloutnvdataarchives.h @@ -10,9 +10,8 @@ class FalloutNVDataArchives : public GamebryoDataArchives { public: - FalloutNVDataArchives(const QDir& myGamesDir); + using GamebryoDataArchives::GamebryoDataArchives; -public: virtual QStringList vanillaArchives() const override; virtual QStringList archives(const MOBase::IProfile* profile) const override; diff --git a/src/game_falloutNV_en.ts b/src/game_falloutNV_en.ts index 00dc698..8aa62ec 100644 --- a/src/game_falloutNV_en.ts +++ b/src/game_falloutNV_en.ts @@ -4,17 +4,17 @@ GameFalloutNV - + Fallout NV Support Plugin - + Adds support for the game Fallout New Vegas - + While not recommended by the FNV modding community, enables LOOT sorting diff --git a/src/gamefalloutnv.cpp b/src/gamefalloutnv.cpp index 9abba54..87b4119 100644 --- a/src/gamefalloutnv.cpp +++ b/src/gamefalloutnv.cpp @@ -35,13 +35,12 @@ bool GameFalloutNV::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(), "fallout.ini")); + registerFeature(std::make_shared(this, "fallout.ini")); registerFeature(std::make_shared(this)); registerFeature( std::make_shared(m_Organizer->gameFeatures())); @@ -104,12 +103,6 @@ void GameFalloutNV::setGamePath(const QString& path) m_GamePath = path; checkVariants(); m_MyGamesPath = determineMyGamesPath(gameDirectoryName()); - - auto dataArchives = std::make_shared(myGamesPath()); - registerFeature(dataArchives); - registerFeature(std::make_shared(dataArchives.get(), this)); - registerFeature( - std::make_shared(myGamesPath(), "fallout.ini")); } QDir GameFalloutNV::savesDirectory() const