mirror of
https://github.com/ModOrganizer2/modorganizer-game_fallout3.git
synced 2026-07-27 14:00:44 -07:00
Merge pull request #23 from ModOrganizer2/dev/format-and-gh-actions
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
---
|
||||
# We'll use defaults from the LLVM style, but with 4 columns indentation.
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 2
|
||||
---
|
||||
Language: Cpp
|
||||
DeriveLineEnding: false
|
||||
UseCRLF: true
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Left
|
||||
AlignConsecutiveAssignments: true
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: Empty
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
AccessModifierOffset: -2
|
||||
AlignTrailingComments: true
|
||||
SpacesBeforeTrailingComments: 2
|
||||
NamespaceIndentation: Inner
|
||||
MaxEmptyLinesToKeep: 1
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: false
|
||||
AfterClass: true
|
||||
AfterControlStatement: false
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
AfterExternBlock: true
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: false
|
||||
SplitEmptyNamespace: true
|
||||
ColumnLimit: 88
|
||||
ForEachMacros: ['Q_FOREACH', 'foreach']
|
||||
@@ -0,0 +1 @@
|
||||
4f0d232b8fbedb307f486880d079eab5c014923e
|
||||
@@ -0,0 +1,7 @@
|
||||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text=auto
|
||||
|
||||
# Explicitly declare text files you want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
*.cpp text eol=crlf
|
||||
*.h text eol=crlf
|
||||
@@ -0,0 +1,16 @@
|
||||
name: Build Fallout 3 Plugin
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: Build Fallout 3 Plugin
|
||||
uses: ModOrganizer2/build-with-mob-action@master
|
||||
with:
|
||||
mo2-dependencies: cmake_common uibase game_gamebryo
|
||||
@@ -0,0 +1,16 @@
|
||||
name: Lint Fallout 3 Plugin
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check format
|
||||
uses: ModOrganizer2/check-formatting-action@master
|
||||
with:
|
||||
check-path: "."
|
||||
@@ -1,40 +0,0 @@
|
||||
version: 1.0.{build}
|
||||
skip_branch_with_pr: true
|
||||
image: Visual Studio 2019
|
||||
environment:
|
||||
WEBHOOK_URL:
|
||||
secure: gOKbXaZM9ImtMD5XrYITvdyZUW/az082G9OIN1EC1Vbg57wBaeLhi49uGjxPw5GVujHku6kxN6ab89zhbS5GVeluR76GM83IbKV4Sh7udXzoYZZdg6YudtYHzdhCgUeiedpswbuczTq9ceIkkfSEWZuh/lMAAVVwvcGsJAnoPFw=
|
||||
build_script:
|
||||
- pwsh: >-
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
git clone --depth=1 --no-single-branch https://github.com/ModOrganizer2/modorganizer-umbrella.git c:\projects\modorganizer-umbrella
|
||||
|
||||
New-Item -ItemType Directory -Path c:\projects\modorganizer-build
|
||||
|
||||
cd c:\projects\modorganizer-umbrella
|
||||
|
||||
($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH -eq $null) ? ($branch = $env:APPVEYOR_REPO_BRANCH) : ($branch = $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH)
|
||||
|
||||
git checkout $(git show-ref --verify --quiet refs/remotes/origin/${branch} || echo '-b') ${branch}
|
||||
|
||||
C:\Python37-x64\python.exe unimake.py -d c:\projects\modorganizer-build -s Appveyor_Build=True ${env:APPVEYOR_PROJECT_NAME}
|
||||
|
||||
if($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode ) }
|
||||
artifacts:
|
||||
- path: vsbuild\src\RelWithDebInfo\game_fallout3.dll
|
||||
name: game_fallout3_dll
|
||||
- path: vsbuild\src\RelWithDebInfo\game_fallout3.pdb
|
||||
name: game_fallout3_pdb
|
||||
- path: vsbuild\src\RelWithDebInfo\game_fallout3.lib
|
||||
name: game_fallout3_lib
|
||||
on_success:
|
||||
- ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER
|
||||
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
|
||||
- ps: ./send.ps1 success $env:WEBHOOK_URL
|
||||
on_failure:
|
||||
- ps: Set-Location -Path $env:APPVEYOR_BUILD_FOLDER
|
||||
- ps: Push-AppveyorArtifact ${env:APPVEYOR_BUILD_FOLDER}\stdout.log
|
||||
- ps: Push-AppveyorArtifact ${env:APPVEYOR_BUILD_FOLDER}\stderr.log
|
||||
- ps: Invoke-RestMethod https://raw.githubusercontent.com/DiscordHooks/appveyor-discord-webhook/master/send.ps1 -o send.ps1
|
||||
- ps: ./send.ps1 failure $env:WEBHOOK_URL
|
||||
@@ -1,16 +1,16 @@
|
||||
#include "fallout3bsainvalidation.h"
|
||||
|
||||
Fallout3BSAInvalidation::Fallout3BSAInvalidation(MOBase::DataArchives* dataArchives, MOBase::IPluginGame const* game)
|
||||
: GamebryoBSAInvalidation(dataArchives, "fallout.ini", game)
|
||||
{
|
||||
}
|
||||
|
||||
QString Fallout3BSAInvalidation::invalidationBSAName() const
|
||||
{
|
||||
return "Fallout - Invalidation.bsa";
|
||||
}
|
||||
|
||||
unsigned long Fallout3BSAInvalidation::bsaVersion() const
|
||||
{
|
||||
return 0x68;
|
||||
}
|
||||
#include "fallout3bsainvalidation.h"
|
||||
|
||||
Fallout3BSAInvalidation::Fallout3BSAInvalidation(MOBase::DataArchives* dataArchives,
|
||||
MOBase::IPluginGame const* game)
|
||||
: GamebryoBSAInvalidation(dataArchives, "fallout.ini", game)
|
||||
{}
|
||||
|
||||
QString Fallout3BSAInvalidation::invalidationBSAName() const
|
||||
{
|
||||
return "Fallout - Invalidation.bsa";
|
||||
}
|
||||
|
||||
unsigned long Fallout3BSAInvalidation::bsaVersion() const
|
||||
{
|
||||
return 0x68;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
#ifndef FALLOUT3BSAINVALIDATION_H
|
||||
#define FALLOUT3BSAINVALIDATION_H
|
||||
|
||||
|
||||
#include "gamebryobsainvalidation.h"
|
||||
#include "fallout3dataarchives.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
class Fallout3BSAInvalidation : public GamebryoBSAInvalidation
|
||||
{
|
||||
public:
|
||||
|
||||
Fallout3BSAInvalidation(MOBase::DataArchives* dataArchives, MOBase::IPluginGame const* game);
|
||||
|
||||
private:
|
||||
|
||||
virtual QString invalidationBSAName() const override;
|
||||
virtual unsigned long bsaVersion() const override;
|
||||
|
||||
};
|
||||
|
||||
#endif // FALLOUT3BSAINVALIDATION_H
|
||||
#ifndef FALLOUT3BSAINVALIDATION_H
|
||||
#define FALLOUT3BSAINVALIDATION_H
|
||||
|
||||
#include "fallout3dataarchives.h"
|
||||
#include "gamebryobsainvalidation.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
class Fallout3BSAInvalidation : public GamebryoBSAInvalidation
|
||||
{
|
||||
public:
|
||||
Fallout3BSAInvalidation(MOBase::DataArchives* dataArchives,
|
||||
MOBase::IPluginGame const* game);
|
||||
|
||||
private:
|
||||
virtual QString invalidationBSAName() const override;
|
||||
virtual unsigned long bsaVersion() const override;
|
||||
};
|
||||
|
||||
#endif // FALLOUT3BSAINVALIDATION_H
|
||||
|
||||
@@ -1,38 +1,37 @@
|
||||
#include "fallout3dataarchives.h"
|
||||
|
||||
#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"
|
||||
, "Fallout - Sound.bsa"
|
||||
, "Fallout - MenuVoices.bsa"
|
||||
, "Fallout - Misc.bsa" };
|
||||
}
|
||||
|
||||
|
||||
QStringList Fallout3DataArchives::archives(const MOBase::IProfile *profile) const
|
||||
{
|
||||
QStringList result;
|
||||
|
||||
QString iniFile = profile->localSettingsEnabled() ? QDir(profile->absolutePath()).absoluteFilePath("fallout.ini") : m_LocalGameDir.absoluteFilePath("fallout.ini");
|
||||
result.append(getArchivesFromKey(iniFile, "SArchiveList"));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void Fallout3DataArchives::writeArchiveList(MOBase::IProfile *profile, const QStringList &before)
|
||||
{
|
||||
QString list = before.join(", ");
|
||||
|
||||
QString iniFile = profile->localSettingsEnabled() ? QDir(profile->absolutePath()).absoluteFilePath("fallout.ini") : m_LocalGameDir.absoluteFilePath("fallout.ini");
|
||||
setArchivesToKey(iniFile, "SArchiveList", list);
|
||||
}
|
||||
#include "fallout3dataarchives.h"
|
||||
|
||||
#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",
|
||||
"Fallout - Sound.bsa", "Fallout - MenuVoices.bsa", "Fallout - Misc.bsa"};
|
||||
}
|
||||
|
||||
QStringList Fallout3DataArchives::archives(const MOBase::IProfile* profile) const
|
||||
{
|
||||
QStringList result;
|
||||
|
||||
QString iniFile = profile->localSettingsEnabled()
|
||||
? QDir(profile->absolutePath()).absoluteFilePath("fallout.ini")
|
||||
: m_LocalGameDir.absoluteFilePath("fallout.ini");
|
||||
result.append(getArchivesFromKey(iniFile, "SArchiveList"));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void Fallout3DataArchives::writeArchiveList(MOBase::IProfile* profile,
|
||||
const QStringList& before)
|
||||
{
|
||||
QString list = before.join(", ");
|
||||
|
||||
QString iniFile = profile->localSettingsEnabled()
|
||||
? QDir(profile->absolutePath()).absoluteFilePath("fallout.ini")
|
||||
: m_LocalGameDir.absoluteFilePath("fallout.ini");
|
||||
setArchivesToKey(iniFile, "SArchiveList", list);
|
||||
}
|
||||
|
||||
+22
-25
@@ -1,25 +1,22 @@
|
||||
#ifndef FALLOUT3DATAARCHIVES_H
|
||||
#define FALLOUT3DATAARCHIVES_H
|
||||
|
||||
|
||||
#include "gamebryodataarchives.h"
|
||||
#include <QDir>
|
||||
|
||||
class Fallout3DataArchives : public GamebryoDataArchives
|
||||
{
|
||||
|
||||
public:
|
||||
Fallout3DataArchives(const QDir &myGamesDir);
|
||||
|
||||
public:
|
||||
|
||||
virtual QStringList vanillaArchives() const override;
|
||||
virtual QStringList archives(const MOBase::IProfile *profile) const override;
|
||||
|
||||
private:
|
||||
|
||||
virtual void writeArchiveList(MOBase::IProfile *profile, const QStringList &before) override;
|
||||
|
||||
};
|
||||
|
||||
#endif // FALLOUT3DATAARCHIVES_H
|
||||
#ifndef FALLOUT3DATAARCHIVES_H
|
||||
#define FALLOUT3DATAARCHIVES_H
|
||||
|
||||
#include "gamebryodataarchives.h"
|
||||
#include <QDir>
|
||||
|
||||
class Fallout3DataArchives : public GamebryoDataArchives
|
||||
{
|
||||
|
||||
public:
|
||||
Fallout3DataArchives(const QDir& myGamesDir);
|
||||
|
||||
public:
|
||||
virtual QStringList vanillaArchives() const override;
|
||||
virtual QStringList archives(const MOBase::IProfile* profile) const override;
|
||||
|
||||
private:
|
||||
virtual void writeArchiveList(MOBase::IProfile* profile,
|
||||
const QStringList& before) override;
|
||||
};
|
||||
|
||||
#endif // FALLOUT3DATAARCHIVES_H
|
||||
|
||||
@@ -9,21 +9,23 @@ public:
|
||||
using GamebryoModDataChecker::GamebryoModDataChecker;
|
||||
|
||||
protected:
|
||||
virtual const FileNameSet& possibleFolderNames() const override {
|
||||
virtual const FileNameSet& possibleFolderNames() const override
|
||||
{
|
||||
static FileNameSet result{
|
||||
"fonts", "interface", "menus", "meshes", "music", "scripts", "shaders",
|
||||
"sound", "strings", "textures", "trees", "video", "facegen", "materials",
|
||||
"fose", "distantlod", "asi", "Tools", "MCM", "distantland", "mits",
|
||||
"dllplugins", "CalienteTools", "NetScriptFramework", "shadersfx"
|
||||
};
|
||||
"fonts", "interface", "menus", "meshes",
|
||||
"music", "scripts", "shaders", "sound",
|
||||
"strings", "textures", "trees", "video",
|
||||
"facegen", "materials", "fose", "distantlod",
|
||||
"asi", "Tools", "MCM", "distantland",
|
||||
"mits", "dllplugins", "CalienteTools", "NetScriptFramework",
|
||||
"shadersfx"};
|
||||
return result;
|
||||
}
|
||||
virtual const FileNameSet& possibleFileExtensions() const override {
|
||||
static FileNameSet result{
|
||||
"esp", "esm", "bsa", "modgroups", "ini"
|
||||
};
|
||||
virtual const FileNameSet& possibleFileExtensions() const override
|
||||
{
|
||||
static FileNameSet result{"esp", "esm", "bsa", "modgroups", "ini"};
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // FALLOUT3_MODATACHECKER_H
|
||||
#endif // FALLOUT3_MODATACHECKER_H
|
||||
|
||||
@@ -4,18 +4,19 @@
|
||||
#include <gamebryomoddatacontent.h>
|
||||
#include <ifiletree.h>
|
||||
|
||||
class Fallout3ModDataContent : public GamebryoModDataContent {
|
||||
class Fallout3ModDataContent : public GamebryoModDataContent
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
Fallout3ModDataContent(MOBase::IGameFeatures const* gameFeatures) : GamebryoModDataContent(gameFeatures) {
|
||||
Fallout3ModDataContent(MOBase::IGameFeatures const* gameFeatures)
|
||||
: GamebryoModDataContent(gameFeatures)
|
||||
{
|
||||
// Just need to disable some contents:
|
||||
m_Enabled[CONTENT_MCM] = false;
|
||||
m_Enabled[CONTENT_MCM] = false;
|
||||
m_Enabled[CONTENT_SKYPROC] = false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // FALLOUT3_MODDATACONTENT_H
|
||||
#endif // FALLOUT3_MODDATACONTENT_H
|
||||
|
||||
+16
-17
@@ -2,31 +2,30 @@
|
||||
|
||||
#include "gamefallout3.h"
|
||||
|
||||
Fallout3SaveGame::Fallout3SaveGame(QString const &fileName, GameFallout3 const *game) :
|
||||
GamebryoSaveGame(fileName, game)
|
||||
Fallout3SaveGame::Fallout3SaveGame(QString const& fileName, GameFallout3 const* game)
|
||||
: GamebryoSaveGame(fileName, game)
|
||||
{
|
||||
FileWrapper file(getFilepath(), "FO3SAVEGAME");
|
||||
|
||||
unsigned long width, height;
|
||||
fetchInformationFields(file, width, height, m_SaveNumber, m_PCName, m_PCLevel, m_PCLocation);
|
||||
fetchInformationFields(file, width, height, m_SaveNumber, m_PCName, m_PCLevel,
|
||||
m_PCLocation);
|
||||
}
|
||||
|
||||
void Fallout3SaveGame::fetchInformationFields(
|
||||
FileWrapper& file,
|
||||
unsigned long& width,
|
||||
unsigned long& height,
|
||||
unsigned long& saveNumber,
|
||||
QString& playerName,
|
||||
unsigned short& playerLevel,
|
||||
QString& playerLocation) const
|
||||
void Fallout3SaveGame::fetchInformationFields(FileWrapper& file, unsigned long& width,
|
||||
unsigned long& height,
|
||||
unsigned long& saveNumber,
|
||||
QString& playerName,
|
||||
unsigned short& playerLevel,
|
||||
QString& playerLocation) const
|
||||
{
|
||||
file.skip<unsigned long>(); //Save header size
|
||||
file.skip<unsigned long>(); // Save header size
|
||||
|
||||
file.setHasFieldMarkers(true);
|
||||
file.setPluginString(GamebryoSaveGame::StringType::TYPE_BZSTRING);
|
||||
|
||||
file.skip<unsigned long>(); //File version ?
|
||||
file.skip<unsigned char>(); //delimiter
|
||||
file.skip<unsigned long>(); // File version ?
|
||||
file.skip<unsigned char>(); // delimiter
|
||||
|
||||
file.read(width);
|
||||
file.read(height);
|
||||
@@ -55,8 +54,8 @@ std::unique_ptr<GamebryoSaveGame::DataFields> Fallout3SaveGame::fetchDataFields(
|
||||
unsigned short dummyLevel;
|
||||
unsigned long dummySaveNumber;
|
||||
|
||||
fetchInformationFields(file, width, height,
|
||||
dummySaveNumber, dummyName, dummyLevel, dummyLocation);
|
||||
fetchInformationFields(file, width, height, dummySaveNumber, dummyName, dummyLevel,
|
||||
dummyLocation);
|
||||
}
|
||||
|
||||
QString playtime;
|
||||
@@ -64,7 +63,7 @@ std::unique_ptr<GamebryoSaveGame::DataFields> Fallout3SaveGame::fetchDataFields(
|
||||
|
||||
fields->Screenshot = file.readImage(width, height, 256);
|
||||
|
||||
file.skip<char>(5); // unknown (1 byte), plugin size (4 bytes)
|
||||
file.skip<char>(5); // unknown (1 byte), plugin size (4 bytes)
|
||||
|
||||
file.setPluginString(GamebryoSaveGame::StringType::TYPE_BSTRING);
|
||||
fields->Plugins = file.readPlugins();
|
||||
|
||||
+6
-11
@@ -8,21 +8,16 @@ class GameFallout3;
|
||||
class Fallout3SaveGame : public GamebryoSaveGame
|
||||
{
|
||||
public:
|
||||
Fallout3SaveGame(QString const &fileName, GameFallout3 const *game);
|
||||
Fallout3SaveGame(QString const& fileName, GameFallout3 const* game);
|
||||
|
||||
protected:
|
||||
|
||||
// Fetch easy-to-access information.
|
||||
void fetchInformationFields(
|
||||
FileWrapper& wrapper,
|
||||
unsigned long& width,
|
||||
unsigned long& height,
|
||||
unsigned long& saveNumber,
|
||||
QString& playerName,
|
||||
unsigned short& playerLevel,
|
||||
QString& playerLocation) const;
|
||||
void fetchInformationFields(FileWrapper& wrapper, unsigned long& width,
|
||||
unsigned long& height, unsigned long& saveNumber,
|
||||
QString& playerName, unsigned short& playerLevel,
|
||||
QString& playerLocation) const;
|
||||
|
||||
std::unique_ptr<DataFields> fetchDataFields() const override;
|
||||
};
|
||||
|
||||
#endif // FALLOUT3SAVEGAME_H
|
||||
#endif // FALLOUT3SAVEGAME_H
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
#include "fallout3scriptextender.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
Fallout3ScriptExtender::Fallout3ScriptExtender(GameGamebryo const *game) :
|
||||
GamebryoScriptExtender(game)
|
||||
{
|
||||
}
|
||||
|
||||
QString Fallout3ScriptExtender::BinaryName() const
|
||||
{
|
||||
return "fose_loader.exe";
|
||||
}
|
||||
|
||||
QString Fallout3ScriptExtender::PluginPath() const
|
||||
{
|
||||
return "fose/plugins";
|
||||
}
|
||||
#include "fallout3scriptextender.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
Fallout3ScriptExtender::Fallout3ScriptExtender(GameGamebryo const* game)
|
||||
: GamebryoScriptExtender(game)
|
||||
{}
|
||||
|
||||
QString Fallout3ScriptExtender::BinaryName() const
|
||||
{
|
||||
return "fose_loader.exe";
|
||||
}
|
||||
|
||||
QString Fallout3ScriptExtender::PluginPath() const
|
||||
{
|
||||
return "fose/plugins";
|
||||
}
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
#ifndef FALLOUT3SCRIPTEXTENDER_H
|
||||
#define FALLOUT3SCRIPTEXTENDER_H
|
||||
|
||||
|
||||
#include "gamebryoscriptextender.h"
|
||||
|
||||
class GameGamebryo;
|
||||
|
||||
class Fallout3ScriptExtender : public GamebryoScriptExtender
|
||||
{
|
||||
public:
|
||||
Fallout3ScriptExtender(GameGamebryo const *game);
|
||||
|
||||
virtual QString BinaryName() const override;
|
||||
virtual QString PluginPath() const override;
|
||||
|
||||
};
|
||||
|
||||
#endif // FALLOUT3SCRIPTEXTENDER_H
|
||||
#ifndef FALLOUT3SCRIPTEXTENDER_H
|
||||
#define FALLOUT3SCRIPTEXTENDER_H
|
||||
|
||||
#include "gamebryoscriptextender.h"
|
||||
|
||||
class GameGamebryo;
|
||||
|
||||
class Fallout3ScriptExtender : public GamebryoScriptExtender
|
||||
{
|
||||
public:
|
||||
Fallout3ScriptExtender(GameGamebryo const* game);
|
||||
|
||||
virtual QString BinaryName() const override;
|
||||
virtual QString PluginPath() const override;
|
||||
};
|
||||
|
||||
#endif // FALLOUT3SCRIPTEXTENDER_H
|
||||
|
||||
+39
-33
@@ -1,19 +1,19 @@
|
||||
#include "gamefallout3.h"
|
||||
|
||||
#include "fallout3bsainvalidation.h"
|
||||
#include "fallout3scriptextender.h"
|
||||
#include "fallout3dataarchives.h"
|
||||
#include "fallout3moddatachecker.h"
|
||||
#include "fallout3moddatacontent.h"
|
||||
#include "fallout3savegame.h"
|
||||
#include "fallout3scriptextender.h"
|
||||
|
||||
#include "executableinfo.h"
|
||||
#include "pluginsetting.h"
|
||||
#include "versioninfo.h"
|
||||
#include <gamebryolocalsavegames.h>
|
||||
#include <gamebryogameplugins.h>
|
||||
#include <gamebryounmanagedmods.h>
|
||||
#include <gamebryolocalsavegames.h>
|
||||
#include <gamebryosavegameinfo.h>
|
||||
#include <gamebryounmanagedmods.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
@@ -27,9 +27,7 @@
|
||||
|
||||
using namespace MOBase;
|
||||
|
||||
GameFallout3::GameFallout3()
|
||||
{
|
||||
}
|
||||
GameFallout3::GameFallout3() {}
|
||||
|
||||
bool GameFallout3::init(IOrganizer* moInfo)
|
||||
{
|
||||
@@ -42,9 +40,11 @@ bool GameFallout3::init(IOrganizer* moInfo)
|
||||
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>(myGamesPath(), "fallout.ini"));
|
||||
registerFeature(std::make_shared<Fallout3ModDataChecker>(this));
|
||||
registerFeature(std::make_shared<Fallout3ModDataContent>(m_Organizer->gameFeatures()));
|
||||
registerFeature(
|
||||
std::make_shared<Fallout3ModDataContent>(m_Organizer->gameFeatures()));
|
||||
registerFeature(std::make_shared<GamebryoGamePlugins>(moInfo));
|
||||
registerFeature(std::make_shared<GamebryoUnmangedMods>(this));
|
||||
return true;
|
||||
@@ -56,11 +56,11 @@ QString GameFallout3::identifyGamePath() const
|
||||
// EPIC Game Store
|
||||
if (result.isEmpty()) {
|
||||
// Fallout 3: Game of the Year Edition: adeae8bbfc94427db57c7dfecce3f1d4
|
||||
result = parseEpicGamesLocation({ "adeae8bbfc94427db57c7dfecce3f1d4" });
|
||||
result = parseEpicGamesLocation({"adeae8bbfc94427db57c7dfecce3f1d4"});
|
||||
if (QFileInfo(result).isDir()) {
|
||||
QDir startPath = QDir(result);
|
||||
auto subDirs = startPath.entryList({ "Fallout 3 GOTY*" },
|
||||
QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
auto subDirs =
|
||||
startPath.entryList({"Fallout 3 GOTY*"}, QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
if (!subDirs.isEmpty())
|
||||
result = startPath.absoluteFilePath(subDirs.first());
|
||||
}
|
||||
@@ -75,21 +75,24 @@ QString GameFallout3::gameName() const
|
||||
|
||||
void GameFallout3::detectGame()
|
||||
{
|
||||
m_GamePath = identifyGamePath();
|
||||
m_GamePath = identifyGamePath();
|
||||
m_MyGamesPath = determineMyGamesPath("Fallout3");
|
||||
}
|
||||
|
||||
QList<ExecutableInfo> GameFallout3::executables() const
|
||||
{
|
||||
return QList<ExecutableInfo>()
|
||||
<< ExecutableInfo("FOSE", findInGameFolder(m_Organizer->gameFeatures()->gameFeature<MOBase::ScriptExtender>()->loaderName()))
|
||||
<< ExecutableInfo("Fallout 3", findInGameFolder(binaryName()))
|
||||
<< ExecutableInfo("Fallout Mod Manager", findInGameFolder("fomm/fomm.exe"))
|
||||
<< ExecutableInfo("Construction Kit", findInGameFolder("geck.exe"))
|
||||
<< ExecutableInfo("Fallout Launcher", findInGameFolder(getLauncherName()))
|
||||
<< ExecutableInfo("BOSS", findInGameFolder("BOSS/BOSS.exe"))
|
||||
<< ExecutableInfo("LOOT", QFileInfo(getLootPath())).withArgument("--game=\"Fallout3\"")
|
||||
;
|
||||
<< ExecutableInfo("FOSE",
|
||||
findInGameFolder(m_Organizer->gameFeatures()
|
||||
->gameFeature<MOBase::ScriptExtender>()
|
||||
->loaderName()))
|
||||
<< ExecutableInfo("Fallout 3", findInGameFolder(binaryName()))
|
||||
<< ExecutableInfo("Fallout Mod Manager", findInGameFolder("fomm/fomm.exe"))
|
||||
<< ExecutableInfo("Construction Kit", findInGameFolder("geck.exe"))
|
||||
<< ExecutableInfo("Fallout Launcher", findInGameFolder(getLauncherName()))
|
||||
<< ExecutableInfo("BOSS", findInGameFolder("BOSS/BOSS.exe"))
|
||||
<< ExecutableInfo("LOOT", QFileInfo(getLootPath()))
|
||||
.withArgument("--game=\"Fallout3\"");
|
||||
}
|
||||
|
||||
QList<ExecutableForcedLoadSetting> GameFallout3::executableForcedLoads() const
|
||||
@@ -122,13 +125,12 @@ MOBase::VersionInfo GameFallout3::version() const
|
||||
return VersionInfo(1, 4, 1, VersionInfo::RELEASE_FINAL);
|
||||
}
|
||||
|
||||
|
||||
QList<PluginSetting> GameFallout3::settings() const
|
||||
{
|
||||
return QList<PluginSetting>();
|
||||
}
|
||||
|
||||
void GameFallout3::initializeProfile(const QDir &path, ProfileSettings settings) const
|
||||
void GameFallout3::initializeProfile(const QDir& path, ProfileSettings settings) const
|
||||
{
|
||||
if (settings.testFlag(IPluginGame::MODS)) {
|
||||
copyToProfile(localAppFolder() + "/Fallout3", path, "plugins.txt");
|
||||
@@ -136,16 +138,17 @@ void GameFallout3::initializeProfile(const QDir &path, ProfileSettings settings)
|
||||
}
|
||||
|
||||
if (settings.testFlag(IPluginGame::CONFIGURATION)) {
|
||||
if (settings.testFlag(IPluginGame::PREFER_DEFAULTS)
|
||||
|| !QFileInfo(myGamesPath() + "/fallout.ini").exists()) {
|
||||
copyToProfile(gameDirectory().absolutePath(), path, "fallout_default.ini", "fallout.ini");
|
||||
if (settings.testFlag(IPluginGame::PREFER_DEFAULTS) ||
|
||||
!QFileInfo(myGamesPath() + "/fallout.ini").exists()) {
|
||||
copyToProfile(gameDirectory().absolutePath(), path, "fallout_default.ini",
|
||||
"fallout.ini");
|
||||
} else {
|
||||
copyToProfile(myGamesPath(), path, "fallout.ini");
|
||||
}
|
||||
|
||||
copyToProfile(myGamesPath(), path, "falloutprefs.ini");
|
||||
copyToProfile(myGamesPath(), path, "FalloutCustom.ini");
|
||||
copyToProfile(myGamesPath(), path, "custom.ini");
|
||||
copyToProfile(myGamesPath(), path, "FalloutCustom.ini");
|
||||
copyToProfile(myGamesPath(), path, "custom.ini");
|
||||
copyToProfile(myGamesPath(), path, "GECKCustom.ini");
|
||||
copyToProfile(myGamesPath(), path, "GECKPrefs.ini");
|
||||
}
|
||||
@@ -161,7 +164,8 @@ QString GameFallout3::savegameSEExtension() const
|
||||
return "";
|
||||
}
|
||||
|
||||
std::shared_ptr<const GamebryoSaveGame> GameFallout3::makeSaveGame(QString filePath) const
|
||||
std::shared_ptr<const GamebryoSaveGame>
|
||||
GameFallout3::makeSaveGame(QString filePath) const
|
||||
{
|
||||
return std::make_shared<const Fallout3SaveGame>(filePath, this);
|
||||
}
|
||||
@@ -177,12 +181,12 @@ QString GameFallout3::steamAPPId() const
|
||||
|
||||
QStringList GameFallout3::primaryPlugins() const
|
||||
{
|
||||
return { "fallout3.esm" };
|
||||
return {"fallout3.esm"};
|
||||
}
|
||||
|
||||
QStringList GameFallout3::gameVariants() const
|
||||
{
|
||||
return { "Regular", "Game Of The Year" };
|
||||
return {"Regular", "Game Of The Year"};
|
||||
}
|
||||
|
||||
QString GameFallout3::gameShortName() const
|
||||
@@ -192,7 +196,7 @@ QString GameFallout3::gameShortName() const
|
||||
|
||||
QStringList GameFallout3::validShortNames() const
|
||||
{
|
||||
return { "FalloutNV" };
|
||||
return {"FalloutNV"};
|
||||
}
|
||||
|
||||
QString GameFallout3::gameNexusName() const
|
||||
@@ -202,12 +206,14 @@ QString GameFallout3::gameNexusName() const
|
||||
|
||||
QStringList GameFallout3::iniFiles() const
|
||||
{
|
||||
return { "fallout.ini", "falloutprefs.ini", "custom.ini", "FalloutCustom.ini", "GECKCustom.ini", "GECKPrefs.ini" };
|
||||
return {"fallout.ini", "falloutprefs.ini", "custom.ini",
|
||||
"FalloutCustom.ini", "GECKCustom.ini", "GECKPrefs.ini"};
|
||||
}
|
||||
|
||||
QStringList GameFallout3::DLCPlugins() const
|
||||
{
|
||||
return { "ThePitt.esm", "Anchorage.esm", "BrokenSteel.esm", "PointLookout.esm", "Zeta.esm" };
|
||||
return {"ThePitt.esm", "Anchorage.esm", "BrokenSteel.esm", "PointLookout.esm",
|
||||
"Zeta.esm"};
|
||||
}
|
||||
|
||||
int GameFallout3::nexusModOrganizerID() const
|
||||
|
||||
+54
-56
@@ -1,56 +1,54 @@
|
||||
#ifndef GAMEFALLOUT3_H
|
||||
#define GAMEFALLOUT3_H
|
||||
|
||||
#include "gamegamebryo.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
|
||||
class GameFallout3 : public GameGamebryo
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.tannin.GameFallout3" FILE "gamefallout3.json")
|
||||
|
||||
public:
|
||||
|
||||
GameFallout3();
|
||||
|
||||
virtual bool init(MOBase::IOrganizer *moInfo) override;
|
||||
|
||||
public: // IPluginGame interface
|
||||
|
||||
virtual QString gameName() const override;
|
||||
virtual void detectGame() override;
|
||||
virtual QList<MOBase::ExecutableInfo> executables() const override;
|
||||
virtual QList<MOBase::ExecutableForcedLoadSetting> executableForcedLoads() const override;
|
||||
virtual void initializeProfile(const QDir &path, ProfileSettings settings) const override;
|
||||
virtual QString steamAPPId() const override;
|
||||
virtual QStringList primaryPlugins() const override;
|
||||
virtual QStringList gameVariants() const;
|
||||
virtual QString gameShortName() const override;
|
||||
virtual QStringList validShortNames() const override;
|
||||
virtual QString gameNexusName() const override;
|
||||
virtual QString getLauncherName() const override;
|
||||
virtual QStringList iniFiles() const override;
|
||||
virtual QStringList DLCPlugins() const override;
|
||||
virtual int nexusModOrganizerID() const override;
|
||||
virtual int nexusGameID() const override;
|
||||
|
||||
public: // IPlugin interface
|
||||
|
||||
virtual QString name() const override;
|
||||
virtual QString localizedName() const override;
|
||||
virtual QString author() const override;
|
||||
virtual QString description() const override;
|
||||
virtual MOBase::VersionInfo version() const override;
|
||||
virtual QList<MOBase::PluginSetting> settings() const override;
|
||||
|
||||
protected:
|
||||
virtual QString identifyGamePath() const override;
|
||||
virtual QString savegameExtension() const override;
|
||||
virtual QString savegameSEExtension() const override;
|
||||
std::shared_ptr<const GamebryoSaveGame> makeSaveGame(QString filePath) const override;
|
||||
|
||||
};
|
||||
|
||||
#endif // GAMEFALLOUT3_H
|
||||
#ifndef GAMEFALLOUT3_H
|
||||
#define GAMEFALLOUT3_H
|
||||
|
||||
#include "gamegamebryo.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
|
||||
class GameFallout3 : public GameGamebryo
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.tannin.GameFallout3" FILE "gamefallout3.json")
|
||||
|
||||
public:
|
||||
GameFallout3();
|
||||
|
||||
virtual bool init(MOBase::IOrganizer* moInfo) override;
|
||||
|
||||
public: // IPluginGame interface
|
||||
virtual QString gameName() const override;
|
||||
virtual void detectGame() override;
|
||||
virtual QList<MOBase::ExecutableInfo> executables() const override;
|
||||
virtual QList<MOBase::ExecutableForcedLoadSetting>
|
||||
executableForcedLoads() const override;
|
||||
virtual void initializeProfile(const QDir& path,
|
||||
ProfileSettings settings) const override;
|
||||
virtual QString steamAPPId() const override;
|
||||
virtual QStringList primaryPlugins() const override;
|
||||
virtual QStringList gameVariants() const;
|
||||
virtual QString gameShortName() const override;
|
||||
virtual QStringList validShortNames() const override;
|
||||
virtual QString gameNexusName() const override;
|
||||
virtual QString getLauncherName() const override;
|
||||
virtual QStringList iniFiles() const override;
|
||||
virtual QStringList DLCPlugins() const override;
|
||||
virtual int nexusModOrganizerID() const override;
|
||||
virtual int nexusGameID() const override;
|
||||
|
||||
public: // IPlugin interface
|
||||
virtual QString name() const override;
|
||||
virtual QString localizedName() const override;
|
||||
virtual QString author() const override;
|
||||
virtual QString description() const override;
|
||||
virtual MOBase::VersionInfo version() const override;
|
||||
virtual QList<MOBase::PluginSetting> settings() const override;
|
||||
|
||||
protected:
|
||||
virtual QString identifyGamePath() const override;
|
||||
virtual QString savegameExtension() const override;
|
||||
virtual QString savegameSEExtension() const override;
|
||||
std::shared_ptr<const GamebryoSaveGame> makeSaveGame(QString filePath) const override;
|
||||
};
|
||||
|
||||
#endif // GAMEFALLOUT3_H
|
||||
|
||||
Reference in New Issue
Block a user