mirror of
https://github.com/ModOrganizer2/modorganizer-game_falloutnv.git
synced 2026-07-27 14:00:29 -07:00
Refactoring following uibase change for game features. (#32)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "falloutnvbsainvalidation.h"
|
||||
|
||||
FalloutNVBSAInvalidation::FalloutNVBSAInvalidation(DataArchives* dataArchives,
|
||||
FalloutNVBSAInvalidation::FalloutNVBSAInvalidation(MOBase::DataArchives* dataArchives,
|
||||
MOBase::IPluginGame const* game)
|
||||
: GamebryoBSAInvalidation(dataArchives, "fallout.ini", game)
|
||||
{}
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
class FalloutNVBSAInvalidation : public GamebryoBSAInvalidation
|
||||
{
|
||||
public:
|
||||
FalloutNVBSAInvalidation(DataArchives* dataArchives, MOBase::IPluginGame const* game);
|
||||
FalloutNVBSAInvalidation(MOBase::DataArchives* dataArchives,
|
||||
MOBase::IPluginGame const* game);
|
||||
|
||||
private:
|
||||
virtual QString invalidationBSAName() const override;
|
||||
|
||||
@@ -33,4 +33,4 @@ void FalloutNVDataArchives::writeArchiveList(MOBase::IProfile* profile,
|
||||
? QDir(profile->absolutePath()).absoluteFilePath("fallout.ini")
|
||||
: m_LocalGameDir.absoluteFilePath("fallout.ini");
|
||||
setArchivesToKey(iniFile, "SArchiveList", list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ public:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
FalloutNVModDataContent(GameGamebryo const* gamePlugin)
|
||||
: GamebryoModDataContent(gamePlugin)
|
||||
FalloutNVModDataContent(MOBase::IGameFeatures const* gameFeatures)
|
||||
: GamebryoModDataContent(gameFeatures)
|
||||
{
|
||||
// Just need to disable some contents:
|
||||
m_Enabled[CONTENT_MCM] = false;
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
<context>
|
||||
<name>GameFalloutNV</name>
|
||||
<message>
|
||||
<location filename="gamefalloutnv.cpp" line="182"/>
|
||||
<location filename="gamefalloutnv.cpp" line="185"/>
|
||||
<source>Fallout NV Support Plugin</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="gamefalloutnv.cpp" line="192"/>
|
||||
<location filename="gamefalloutnv.cpp" line="195"/>
|
||||
<source>Adds support for the game Fallout New Vegas</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="gamefalloutnv.cpp" line="204"/>
|
||||
<location filename="gamefalloutnv.cpp" line="207"/>
|
||||
<source>While not recommended by the FNV modding community, enables LOOT sorting</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
||||
+23
-17
@@ -34,17 +34,20 @@ bool GameFalloutNV::init(IOrganizer* moInfo)
|
||||
if (!GameGamebryo::init(moInfo)) {
|
||||
return false;
|
||||
}
|
||||
registerFeature<ScriptExtender>(new FalloutNVScriptExtender(this));
|
||||
registerFeature<DataArchives>(new FalloutNVDataArchives(myGamesPath()));
|
||||
registerFeature<BSAInvalidation>(
|
||||
new FalloutNVBSAInvalidation(feature<DataArchives>(), this));
|
||||
registerFeature<SaveGameInfo>(new GamebryoSaveGameInfo(this));
|
||||
registerFeature<LocalSavegames>(
|
||||
new GamebryoLocalSavegames(myGamesPath(), "fallout.ini"));
|
||||
registerFeature<ModDataChecker>(new FalloutNVModDataChecker(this));
|
||||
registerFeature<ModDataContent>(new FalloutNVModDataContent(this));
|
||||
registerFeature<GamePlugins>(new GamebryoGamePlugins(moInfo));
|
||||
registerFeature<UnmanagedMods>(new GamebryoUnmangedMods(this));
|
||||
|
||||
auto dataArchives = std::make_shared<FalloutNVDataArchives>(myGamesPath());
|
||||
registerFeature(std::make_shared<FalloutNVScriptExtender>(this));
|
||||
registerFeature(dataArchives);
|
||||
registerFeature(std::make_shared<FalloutNVBSAInvalidation>(dataArchives.get(), this));
|
||||
registerFeature(std::make_shared<GamebryoSaveGameInfo>(this));
|
||||
registerFeature(
|
||||
std::make_shared<GamebryoLocalSavegames>(myGamesPath(), "fallout.ini"));
|
||||
registerFeature(std::make_shared<FalloutNVModDataChecker>(this));
|
||||
registerFeature(
|
||||
std::make_shared<FalloutNVModDataContent>(m_Organizer->gameFeatures()));
|
||||
registerFeature(std::make_shared<GamebryoGamePlugins>(moInfo));
|
||||
registerFeature(std::make_shared<GamebryoUnmangedMods>(this));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -101,11 +104,12 @@ void GameFalloutNV::setGamePath(const QString& path)
|
||||
m_GamePath = path;
|
||||
checkVariants();
|
||||
m_MyGamesPath = determineMyGamesPath(gameDirectoryName());
|
||||
registerFeature<DataArchives>(new FalloutNVDataArchives(myGamesPath()));
|
||||
registerFeature<BSAInvalidation>(
|
||||
new FalloutNVBSAInvalidation(feature<DataArchives>(), this));
|
||||
registerFeature<LocalSavegames>(
|
||||
new GamebryoLocalSavegames(myGamesPath(), "fallout.ini"));
|
||||
|
||||
auto dataArchives = std::make_shared<FalloutNVDataArchives>(myGamesPath());
|
||||
registerFeature(dataArchives);
|
||||
registerFeature(std::make_shared<FalloutNVBSAInvalidation>(dataArchives.get(), this));
|
||||
registerFeature(
|
||||
std::make_shared<GamebryoLocalSavegames>(myGamesPath(), "fallout.ini"));
|
||||
}
|
||||
|
||||
QDir GameFalloutNV::savesDirectory() const
|
||||
@@ -157,7 +161,9 @@ QList<ExecutableInfo> GameFalloutNV::executables() const
|
||||
.withArgument("--game=\"FalloutNV\"");
|
||||
if (selectedVariant() != "Epic Games") {
|
||||
extraExecutables.prepend(ExecutableInfo(
|
||||
"NVSE", findInGameFolder(feature<ScriptExtender>()->loaderName())));
|
||||
"NVSE", findInGameFolder(m_Organizer->gameFeatures()
|
||||
->gameFeature<MOBase::ScriptExtender>()
|
||||
->loaderName())));
|
||||
} else {
|
||||
game.withArgument("-EpicPortal");
|
||||
launcher.withArgument("-EpicPortal");
|
||||
|
||||
Reference in New Issue
Block a user