mirror of
https://github.com/ModOrganizer2/modorganizer-game_fallout3.git
synced 2026-07-27 14:00:44 -07:00
Update following gamebryo updates for myGamesPath() in game feature. (#24)
This commit is contained in:
@@ -3,10 +3,6 @@
|
||||
#include "iprofile.h"
|
||||
#include <utility.h>
|
||||
|
||||
Fallout3DataArchives::Fallout3DataArchives(const QDir& myGamesDir)
|
||||
: GamebryoDataArchives(myGamesDir)
|
||||
{}
|
||||
|
||||
QStringList Fallout3DataArchives::vanillaArchives() const
|
||||
{
|
||||
return {"Fallout - Textures.bsa", "Fallout - Meshes.bsa", "Fallout - Voices.bsa",
|
||||
@@ -19,7 +15,7 @@ QStringList Fallout3DataArchives::archives(const MOBase::IProfile* profile) cons
|
||||
|
||||
QString iniFile = profile->localSettingsEnabled()
|
||||
? QDir(profile->absolutePath()).absoluteFilePath("fallout.ini")
|
||||
: m_LocalGameDir.absoluteFilePath("fallout.ini");
|
||||
: localGameDirectory().absoluteFilePath("fallout.ini");
|
||||
result.append(getArchivesFromKey(iniFile, "SArchiveList"));
|
||||
|
||||
return result;
|
||||
@@ -32,6 +28,6 @@ void Fallout3DataArchives::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);
|
||||
}
|
||||
|
||||
@@ -6,11 +6,9 @@
|
||||
|
||||
class Fallout3DataArchives : public GamebryoDataArchives
|
||||
{
|
||||
|
||||
public:
|
||||
Fallout3DataArchives(const QDir& myGamesDir);
|
||||
using GamebryoDataArchives::GamebryoDataArchives;
|
||||
|
||||
public:
|
||||
virtual QStringList vanillaArchives() const override;
|
||||
virtual QStringList archives(const MOBase::IProfile* profile) const override;
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<context>
|
||||
<name>GameFallout3</name>
|
||||
<message>
|
||||
<location filename="gamefallout3.cpp" line="107"/>
|
||||
<location filename="gamefallout3.cpp" line="109"/>
|
||||
<source>Fallout 3 Support Plugin</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="gamefallout3.cpp" line="117"/>
|
||||
<location filename="gamefallout3.cpp" line="119"/>
|
||||
<source>Adds support for the game Fallout 3.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
||||
@@ -35,13 +35,12 @@ bool GameFallout3::init(IOrganizer* moInfo)
|
||||
return false;
|
||||
}
|
||||
|
||||
auto dataArchives = std::make_shared<Fallout3DataArchives>(myGamesPath());
|
||||
auto dataArchives = std::make_shared<Fallout3DataArchives>(this);
|
||||
registerFeature(std::make_shared<Fallout3ScriptExtender>(this));
|
||||
registerFeature(dataArchives);
|
||||
registerFeature(std::make_shared<Fallout3BSAInvalidation>(dataArchives.get(), this));
|
||||
registerFeature(std::make_shared<GamebryoSaveGameInfo>(this));
|
||||
registerFeature(
|
||||
std::make_shared<GamebryoLocalSavegames>(myGamesPath(), "fallout.ini"));
|
||||
registerFeature(std::make_shared<GamebryoLocalSavegames>(this, "fallout.ini"));
|
||||
registerFeature(std::make_shared<Fallout3ModDataChecker>(this));
|
||||
registerFeature(
|
||||
std::make_shared<Fallout3ModDataContent>(m_Organizer->gameFeatures()));
|
||||
@@ -139,7 +138,7 @@ void GameFallout3::initializeProfile(const QDir& path, ProfileSettings settings)
|
||||
|
||||
if (settings.testFlag(IPluginGame::CONFIGURATION)) {
|
||||
if (settings.testFlag(IPluginGame::PREFER_DEFAULTS) ||
|
||||
!QFileInfo(myGamesPath() + "/fallout.ini").exists()) {
|
||||
!QFileInfo(myGamesPath(), "fallout.ini").exists()) {
|
||||
copyToProfile(gameDirectory().absolutePath(), path, "fallout_default.ini",
|
||||
"fallout.ini");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user