mirror of
https://github.com/ModOrganizer2/modorganizer-game_fallout76.git
synced 2026-07-27 14:08:28 -07:00
Merge branch 'master' of https://github.com/TanninOne/modorganizer-game_fallout4
Conflicts: src/gamefallout4.cpp src/gamefallout4.h
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ Import('qt_env')
|
||||
env = qt_env.Clone()
|
||||
|
||||
# Shouldn't this be GAMEFALLOUT3_LIBRARY
|
||||
env.AppendUnique(CPPDEFINES = [ 'GAMEFALLOUTNV_LIBRARY' ])
|
||||
env.AppendUnique(CPPDEFINES = [ 'GAMEFALLOUT4_LIBRARY' ])
|
||||
|
||||
env.RequiresGamebryo()
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#include "fallout4dataarchives.h"
|
||||
|
||||
#include "iprofile.h"
|
||||
#include <utility.h>
|
||||
|
||||
#include <QDir>
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#ifndef FALLOUT3DATAARCHIVES_H
|
||||
#define FALLOUT3DATAARCHIVES_H
|
||||
#ifndef FALLOUT4DATAARCHIVES_H
|
||||
#define FALLOUT4DATAARCHIVES_H
|
||||
|
||||
#include "gamebryodataarchives.h"
|
||||
|
||||
namespace MOBase { class IProfile; }
|
||||
|
||||
#include <gamebryodataarchives.h>
|
||||
#include <iprofile.h>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
class Fallout4DataArchives : public GamebryoDataArchives
|
||||
@@ -21,4 +21,4 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif // FALLOUT3DATAARCHIVES_H
|
||||
#endif // FALLOUT4DATAARCHIVES_H
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
#include "fallout4scriptextender.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
Fallout4ScriptExtender::Fallout4ScriptExtender(GameGamebryo const *game) :
|
||||
GamebryoScriptExtender(game)
|
||||
{
|
||||
}
|
||||
|
||||
QString Fallout4ScriptExtender::name() const
|
||||
{
|
||||
return "f4se";
|
||||
}
|
||||
|
||||
QStringList Fallout4ScriptExtender::saveGameAttachmentExtensions() const
|
||||
{
|
||||
return { };
|
||||
}
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
#ifndef FALLOUT3SCRIPTEXTENDER_H
|
||||
#define FALLOUT3SCRIPTEXTENDER_H
|
||||
#ifndef FALLOUT4SCRIPTEXTENDER_H
|
||||
#define FALLOUT4SCRIPTEXTENDER_H
|
||||
|
||||
#include "gamebryoscriptextender.h"
|
||||
|
||||
#include <scriptextender.h>
|
||||
|
||||
|
||||
class Fallout4ScriptExtender : public ScriptExtender
|
||||
class Fallout4ScriptExtender : public GamebryoScriptExtender
|
||||
{
|
||||
public:
|
||||
Fallout4ScriptExtender(GameGamebryo const *game);
|
||||
|
||||
virtual QString name() const override;
|
||||
|
||||
virtual QStringList saveGameAttachmentExtensions() const override;
|
||||
|
||||
};
|
||||
|
||||
#endif // FALLOUT3SCRIPTEXTENDER_H
|
||||
#endif // FALLOUT4SCRIPTEXTENDER_H
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2014-11-15T15:36:33
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
|
||||
TARGET = gameFallout3
|
||||
TEMPLATE = lib
|
||||
|
||||
CONFIG += plugins
|
||||
CONFIG += dll
|
||||
|
||||
DEFINES += GAMEFALLOUT4_LIBRARY
|
||||
|
||||
SOURCES += gamefallout4.cpp \
|
||||
fallout4bsainvalidation.cpp \
|
||||
fallout4scriptextender.cpp \
|
||||
fallout4dataarchives.cpp
|
||||
|
||||
HEADERS += gamefallout4.h \
|
||||
fallout4bsainvalidation.h \
|
||||
fallout4scriptextender.h \
|
||||
fallout4dataarchives.h
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
LIBS += -L"$${OUT_PWD}/../gameGamebryo/debug"
|
||||
PRE_TARGETDEPS += \
|
||||
$$OUT_PWD/../gameGamebryo/debug/gameGamebryo.lib
|
||||
} else {
|
||||
LIBS += -L"$${OUT_PWD}/../gameGamebryo/release"
|
||||
PRE_TARGETDEPS += \
|
||||
$$OUT_PWD/../gameGamebryo/release/gameGamebryo.lib
|
||||
}
|
||||
|
||||
include(../plugin_template.pri)
|
||||
|
||||
INCLUDEPATH += "$${BOOSTPATH}" "$${PWD}/../gamefeatures" "$${PWD}/../gamegamebryo"
|
||||
|
||||
LIBS += -ladvapi32 -lole32 -lgameGamebryo
|
||||
|
||||
OTHER_FILES += \
|
||||
gamefallout4.json\
|
||||
SConscript \
|
||||
CMakeLists.txt
|
||||
|
||||
+42
-25
@@ -1,15 +1,19 @@
|
||||
#include "gameFallout4.h"
|
||||
|
||||
#include "fallout4dataarchives.h"
|
||||
#include "fallout4scriptextender.h"
|
||||
#include <scopeguard.h>
|
||||
#include <pluginsetting.h>
|
||||
#include <igameinfo.h>
|
||||
#include "iplugingame.h"
|
||||
#include <executableinfo.h>
|
||||
#include <gamebryolocalsavegames.h>
|
||||
#include <utility.h>
|
||||
#include <memory>
|
||||
|
||||
#include <QStandardPaths>
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
|
||||
#include <memory>
|
||||
|
||||
using namespace MOBase;
|
||||
|
||||
@@ -23,7 +27,8 @@ bool GameFallout4::init(IOrganizer *moInfo)
|
||||
if (!GameGamebryo::init(moInfo)) {
|
||||
return false;
|
||||
}
|
||||
m_ScriptExtender = std::shared_ptr<ScriptExtender>(new Fallout4ScriptExtender());
|
||||
m_ScriptExtender = std::shared_ptr<ScriptExtender>(new Fallout4ScriptExtender(this));
|
||||
m_DataArchives = std::shared_ptr<DataArchives>(new Fallout4DataArchives());
|
||||
m_LocalSavegames.reset(new GamebryoLocalSavegames(myGamesPath(), "Fallout4.ini"));
|
||||
return true;
|
||||
}
|
||||
@@ -43,13 +48,13 @@ QString GameFallout4::myGamesFolderName() const
|
||||
return "Fallout4";
|
||||
}
|
||||
|
||||
QList<ExecutableInfo> GameFallout4::executables()
|
||||
QList<ExecutableInfo> GameFallout4::executables() const
|
||||
{
|
||||
return QList<ExecutableInfo>()
|
||||
<< ExecutableInfo("F4SE", findInGameFolder("f4se_loader.exe"))
|
||||
<< ExecutableInfo("Fallout 4", findInGameFolder("Fallout4.exe"))
|
||||
<< ExecutableInfo("Fallout Launcher", findInGameFolder("Fallout4Launcher.exe"))
|
||||
<< ExecutableInfo("LOOT", getLootPath());
|
||||
<< ExecutableInfo("F4SE", findInGameFolder(m_ScriptExtender->loaderName()))
|
||||
<< ExecutableInfo("Fallout 4", findInGameFolder(getBinaryName()))
|
||||
<< ExecutableInfo("Fallout Launcher", findInGameFolder(getLauncherName()))
|
||||
<< ExecutableInfo("LOOT", getLootPath())
|
||||
;
|
||||
}
|
||||
|
||||
@@ -125,28 +130,40 @@ QString GameFallout4::steamAPPId() const
|
||||
return "377160";
|
||||
}
|
||||
|
||||
QStringList GameFallout4::getPrimaryPlugins()
|
||||
QStringList GameFallout4::getPrimaryPlugins() const
|
||||
{
|
||||
return { "fallout4.esm" };
|
||||
}
|
||||
|
||||
QIcon GameFallout4::gameIcon() const
|
||||
{
|
||||
return MOBase::iconForExecutable(gameDirectory().absoluteFilePath("Fallout4.exe"));
|
||||
}
|
||||
|
||||
const std::map<std::type_index, boost::any> &GameFallout4::featureList() const
|
||||
{
|
||||
static std::map<std::type_index, boost::any> result {
|
||||
{ typeid(ScriptExtender), m_ScriptExtender.get() },
|
||||
{ typeid(LocalSavegames), m_LocalSavegames.get() }
|
||||
};
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
QStringList GameFallout4::gameVariants() const
|
||||
{
|
||||
return { "Regular" };
|
||||
}
|
||||
|
||||
QString GameFallout4::getGameShortName() const
|
||||
{
|
||||
return "Fallout4";
|
||||
}
|
||||
|
||||
QStringList GameFallout4::getIniFiles() const
|
||||
{
|
||||
return { "fallout4.ini", "fallout4prefs.ini" };
|
||||
}
|
||||
|
||||
QStringList GameFallout4::getDLCPlugins() const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
//what load order mechanism?
|
||||
// virtual LoadOrderMechanism getLoadOrderMechanism() const = 0;
|
||||
|
||||
int GameFallout4::getNexusModOrganizerID() const
|
||||
{
|
||||
return 0; //...
|
||||
}
|
||||
|
||||
int GameFallout4::getNexusGameID() const
|
||||
{
|
||||
return 1151;
|
||||
}
|
||||
|
||||
+21
-27
@@ -2,10 +2,7 @@
|
||||
#define GAMEFALLOUT4_H
|
||||
|
||||
|
||||
#include "fallout4scriptextender.h"
|
||||
#include "gamebryolocalsavegames.h"
|
||||
#include <gamegamebryo.h>
|
||||
#include <QFileInfo>
|
||||
#include "gamegamebryo.h"
|
||||
|
||||
|
||||
class GameFallout4 : public GameGamebryo
|
||||
@@ -21,27 +18,29 @@ public:
|
||||
|
||||
public: // IPluginGame interface
|
||||
|
||||
virtual QString gameName() const;
|
||||
virtual QList<MOBase::ExecutableInfo> executables();
|
||||
virtual void initializeProfile(const QDir &path, ProfileSettings settings) const;
|
||||
virtual QString savegameExtension() const;
|
||||
virtual QString steamAPPId() const;
|
||||
virtual QStringList getPrimaryPlugins();
|
||||
virtual QIcon gameIcon() const override;
|
||||
virtual QStringList gameVariants() const;
|
||||
virtual QString gameName() const override;
|
||||
virtual QList<MOBase::ExecutableInfo> executables() const override;
|
||||
virtual void initializeProfile(const QDir &path, ProfileSettings settings) const override;
|
||||
virtual QString savegameExtension() const override;
|
||||
virtual QString steamAPPId() const override;
|
||||
virtual QStringList getPrimaryPlugins() const override;
|
||||
virtual QStringList gameVariants() const override;
|
||||
virtual QString getGameShortName() const override;
|
||||
virtual QStringList getIniFiles() const override;
|
||||
virtual QStringList getDLCPlugins() const override;
|
||||
//what load order mechanism?
|
||||
// virtual LoadOrderMechanism getLoadOrderMechanism() const = 0;
|
||||
virtual int getNexusModOrganizerID() const override;
|
||||
virtual int getNexusGameID() const override;
|
||||
|
||||
public: // IPlugin interface
|
||||
|
||||
virtual QString name() const;
|
||||
virtual QString author() const;
|
||||
virtual QString description() const;
|
||||
virtual MOBase::VersionInfo version() const;
|
||||
virtual bool isActive() const;
|
||||
virtual QList<MOBase::PluginSetting> settings() const;
|
||||
|
||||
protected:
|
||||
|
||||
virtual const std::map<std::type_index, boost::any> &featureList() const;
|
||||
virtual QString name() const override;
|
||||
virtual QString author() const override;
|
||||
virtual QString description() const override;
|
||||
virtual MOBase::VersionInfo version() const override;
|
||||
virtual bool isActive() const override;
|
||||
virtual QList<MOBase::PluginSetting> settings() const override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -51,11 +50,6 @@ private:
|
||||
void copyToProfile(const QString &sourcePath, const QDir &destinationDirectory,
|
||||
const QString &sourceFileName, const QString &destinationFileName = QString()) const;
|
||||
|
||||
private:
|
||||
|
||||
std::shared_ptr<ScriptExtender> m_ScriptExtender { nullptr };
|
||||
std::shared_ptr<LocalSavegames> m_LocalSavegames { nullptr };
|
||||
|
||||
};
|
||||
|
||||
#endif // GAMEFallout4_H
|
||||
|
||||
Reference in New Issue
Block a user