Skip to content
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

Update following gamebryo updates for myGamesPath() in game feature. #37

Merged
merged 1 commit into from
Jun 22, 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
4 changes: 2 additions & 2 deletions src/game_skyrimse_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<context>
<name>GameSkyrimSE</name>
<message>
<location filename="gameskyrimse.cpp" line="186"/>
<location filename="gameskyrimse.cpp" line="180"/>
<source>Skyrim Special Edition Support Plugin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="gameskyrimse.cpp" line="196"/>
<location filename="gameskyrimse.cpp" line="190"/>
<source>Adds support for the game Skyrim Special Edition.</source>
<translation type="unfinished"></translation>
</message>
Expand Down
10 changes: 2 additions & 8 deletions src/gameskyrimse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ void GameSkyrimSE::setGamePath(const QString& path)
m_GamePath = path;
checkVariants();
m_MyGamesPath = determineMyGamesPath(gameDirectoryName());

registerFeature(std::make_shared<SkyrimSEDataArchives>(myGamesPath()));
registerFeature(
std::make_shared<GamebryoLocalSavegames>(myGamesPath(), "Skyrimcustom.ini"));
}

QDir GameSkyrimSE::savesDirectory() const
Expand All @@ -120,11 +116,9 @@ bool GameSkyrimSE::init(IOrganizer* moInfo)
return false;
}

registerFeature(std::make_shared<SkyrimSEDataArchives>(myGamesPath()));
registerFeature(std::make_shared<SkyrimSEScriptExtender>(this));
registerFeature(std::make_shared<SkyrimSEDataArchives>(myGamesPath()));
registerFeature(
std::make_shared<GamebryoLocalSavegames>(myGamesPath(), "Skyrimcustom.ini"));
registerFeature(std::make_shared<SkyrimSEDataArchives>(this));
registerFeature(std::make_shared<GamebryoLocalSavegames>(this, "Skyrimcustom.ini"));
registerFeature(std::make_shared<SkyrimSEModDataChecker>(this));
registerFeature(
std::make_shared<SkyrimSEModDataContent>(m_Organizer->gameFeatures()));
Expand Down
8 changes: 2 additions & 6 deletions src/skyrimsedataarchives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
#include "iprofile.h"
#include <utility.h>

SkyrimSEDataArchives::SkyrimSEDataArchives(const QDir& myGamesDir)
: GamebryoDataArchives(myGamesDir)
{}

QStringList SkyrimSEDataArchives::vanillaArchives() const
{
return {"Skyrim - Textures0.bsa", "Skyrim - Textures1.bsa", "Skyrim - Textures2.bsa",
Expand All @@ -23,7 +19,7 @@ QStringList SkyrimSEDataArchives::archives(const MOBase::IProfile* profile) cons

QString iniFile = profile->localSettingsEnabled()
? QDir(profile->absolutePath()).absoluteFilePath("skyrim.ini")
: m_LocalGameDir.absoluteFilePath("skyrim.ini");
: localGameDirectory().absoluteFilePath("skyrim.ini");
result.append(getArchivesFromKey(iniFile, "SResourceArchiveList"));
result.append(getArchivesFromKey(iniFile, "SResourceArchiveList2"));

Expand All @@ -37,7 +33,7 @@ void SkyrimSEDataArchives::writeArchiveList(MOBase::IProfile* profile,

QString iniFile = profile->localSettingsEnabled()
? QDir(profile->absolutePath()).absoluteFilePath("skyrim.ini")
: m_LocalGameDir.absoluteFilePath("skyrim.ini");
: localGameDirectory().absoluteFilePath("skyrim.ini");
if (list.length() > 255) {
int splitIdx = list.lastIndexOf(",", 256);
setArchivesToKey(iniFile, "SResourceArchiveList", list.mid(0, splitIdx));
Expand Down
5 changes: 1 addition & 4 deletions src/skyrimsedataarchives.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ class IProfile;

class SkyrimSEDataArchives : public GamebryoDataArchives
{
using GamebryoDataArchives::GamebryoDataArchives;

public:
SkyrimSEDataArchives(const QDir& myGamesDir);

public:
virtual QStringList vanillaArchives() const override;
virtual QStringList archives(const MOBase::IProfile* profile) const override;

Expand Down
Loading