Skip to content

Refactoring of game features for better management. #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 2 additions & 163 deletions src/game_oblivion_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,175 +4,14 @@
<context>
<name>GameOblivion</name>
<message>
<location filename="gameoblivion.cpp" line="78"/>
<location filename="gameoblivion.cpp" line="80"/>
<source>Oblivion Support Plugin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gameoblivion.cpp" line="88"/>
<location filename="gameoblivion.cpp" line="90"/>
<source>Adds support for the game Oblivion</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GamebryoModDataContent</name>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="12"/>
<source>Plugins (ESP/ESM/ESL)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="13"/>
<source>Optional Plugins</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="14"/>
<source>Interface</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="15"/>
<source>Meshes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="16"/>
<source>Bethesda Archive</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="17"/>
<source>Scripts (Papyrus)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="18"/>
<source>Script Extender Plugin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="19"/>
<source>Script Extender Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="20"/>
<source>SkyProc Patcher</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="21"/>
<source>Sound or Music</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="22"/>
<source>Textures</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="23"/>
<source>MCM Configuration</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="24"/>
<source>INI Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="25"/>
<source>FaceGen Data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryomoddatacontent.cpp" line="26"/>
<source>ModGroup Files</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GamebryoSaveGameInfoWidget</name>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegameinfowidget.ui" line="39"/>
<source>Save #</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegameinfowidget.ui" line="51"/>
<source>Character</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegameinfowidget.ui" line="63"/>
<source>Level</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegameinfowidget.ui" line="75"/>
<source>Location</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegameinfowidget.ui" line="87"/>
<source>Date</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegameinfowidget.cpp" line="72"/>
<source>Has Script Extender Data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegameinfowidget.cpp" line="77"/>
<source>Missing ESPs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegameinfowidget.cpp" line="110"/>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegameinfowidget.cpp" line="148"/>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegameinfowidget.cpp" line="116"/>
<source>Missing ESLs</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../../game_gamebryo/src/creation/creationgameplugins.cpp" line="105"/>
<location filename="../../game_gamebryo/src/gamebryo/gamebryogameplugins.cpp" line="127"/>
<source>Some of your plugins have invalid names! These plugins can not be loaded by the game. Please see mo_interface.log for a list of affected plugins and rename them.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegame.cpp" line="47"/>
<source>%1, #%2, Level %3, %4</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegame.cpp" line="97"/>
<source>failed to open %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamebryosavegame.cpp" line="107"/>
<source>wrong file format - expected %1 got %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamegamebryo.cpp" line="323"/>
<source>failed to query registry path (preflight): %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../game_gamebryo/src/gamebryo/gamegamebryo.cpp" line="330"/>
<source>failed to query registry path (read): %1</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
20 changes: 11 additions & 9 deletions src/gameoblivion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ bool GameOblivion::init(IOrganizer *moInfo)
if (!GameGamebryo::init(moInfo)) {
return false;
}
registerFeature<ScriptExtender>(new OblivionScriptExtender(this));
registerFeature<DataArchives>(new OblivionDataArchives(myGamesPath()));
registerFeature<BSAInvalidation>(new OblivionBSAInvalidation(feature<DataArchives>(), this));
registerFeature<SaveGameInfo>(new GamebryoSaveGameInfo(this));
registerFeature<LocalSavegames>(new GamebryoLocalSavegames(myGamesPath(), "oblivion.ini"));
registerFeature<ModDataChecker>(new OblivionModDataChecker(this));
registerFeature<ModDataContent>(new OblivionModDataContent(this));
registerFeature<GamePlugins>(new GamebryoGamePlugins(moInfo));
registerFeature<UnmanagedMods>(new GamebryoUnmangedMods(this));

auto dataArchives = std::make_shared<OblivionDataArchives>(myGamesPath());
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<OblivionModDataChecker>(this));
registerFeature(std::make_shared<OblivionModDataContent>(m_Organizer->gameFeatures()));
registerFeature(std::make_shared<GamebryoGamePlugins>(moInfo));
registerFeature(std::make_shared<GamebryoUnmangedMods>(this));
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion src/oblivionbsainvalidation.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "oblivionbsainvalidation.h"


OblivionBSAInvalidation::OblivionBSAInvalidation(DataArchives *dataArchives, MOBase::IPluginGame const *game)
OblivionBSAInvalidation::OblivionBSAInvalidation(MOBase::DataArchives *dataArchives, MOBase::IPluginGame const *game)
: GamebryoBSAInvalidation(dataArchives, "oblivion.ini", game)
{
}
Expand Down
2 changes: 1 addition & 1 deletion src/oblivionbsainvalidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class OblivionBSAInvalidation : public GamebryoBSAInvalidation
{
public:

OblivionBSAInvalidation(DataArchives *dataArchives, MOBase::IPluginGame const *game);
OblivionBSAInvalidation(MOBase::DataArchives *dataArchives, MOBase::IPluginGame const *game);

private:

Expand Down
2 changes: 1 addition & 1 deletion src/oblivionmoddatachecker.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "oblivionmoddatachecker.h"

ModDataChecker::CheckReturn OblivionModDataChecker::dataLooksValid(
MOBase::ModDataChecker::CheckReturn OblivionModDataChecker::dataLooksValid(
std::shared_ptr<const MOBase::IFileTree> fileTree) const
{
// Check with Gamebryo stuff:
Expand Down
2 changes: 1 addition & 1 deletion src/oblivionmoddatacontent.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class OblivionModDataContent : public GamebryoModDataContent {
/**
*
*/
OblivionModDataContent(GameGamebryo const* gamePlugin) : GamebryoModDataContent(gamePlugin) {
OblivionModDataContent(const MOBase::IGameFeatures* gameFeatures) : GamebryoModDataContent(gameFeatures) {
// Just need to disable some contents:
m_Enabled[CONTENT_MCM] = false;
m_Enabled[CONTENT_SKYPROC] = false;
Expand Down