mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
Move IPluginGameWrapper's mentod implementations into the cpp file
This commit is contained in:
@@ -79,6 +79,200 @@ QList<MOBase::PluginSetting> IPluginWrapper::settings() const
|
||||
}
|
||||
/// end IPlugin Wrapper
|
||||
/////////////////////////////////////
|
||||
/// IPluginGame Wrapper
|
||||
|
||||
|
||||
QString IPluginGameWrapper::gameName() const
|
||||
{
|
||||
return this->get_override("gameName")();
|
||||
}
|
||||
|
||||
void IPluginGameWrapper::initializeProfile(const QDir & directory, ProfileSettings settings) const
|
||||
{
|
||||
this->get_override("initializeProfile")(directory, settings);
|
||||
}
|
||||
|
||||
QString IPluginGameWrapper::savegameExtension() const
|
||||
{
|
||||
return this->get_override("savegameExtension")();
|
||||
}
|
||||
|
||||
QString IPluginGameWrapper::savegameSEExtension() const
|
||||
{
|
||||
return this->get_override("savegameSEExtension")();
|
||||
}
|
||||
|
||||
bool IPluginGameWrapper::isInstalled() const
|
||||
{
|
||||
return this->get_override("isInstalled")();
|
||||
}
|
||||
|
||||
QIcon IPluginGameWrapper::gameIcon() const
|
||||
{
|
||||
return this->get_override("gameIcon")();
|
||||
}
|
||||
|
||||
QDir IPluginGameWrapper::gameDirectory() const
|
||||
{
|
||||
return this->get_override("gameDirectory")();
|
||||
}
|
||||
|
||||
QDir IPluginGameWrapper::dataDirectory() const
|
||||
{
|
||||
return this->get_override("dataDirectory")();
|
||||
}
|
||||
|
||||
void IPluginGameWrapper::setGamePath(const QString & path)
|
||||
{
|
||||
this->get_override("setGamePath")(path);
|
||||
}
|
||||
|
||||
QDir IPluginGameWrapper::documentsDirectory() const
|
||||
{
|
||||
return this->get_override("documentsDirectory")();
|
||||
}
|
||||
|
||||
QDir IPluginGameWrapper::savesDirectory() const
|
||||
{
|
||||
return this->get_override("savesDirectory")();
|
||||
}
|
||||
|
||||
QList<MOBase::ExecutableInfo> IPluginGameWrapper::executables() const
|
||||
{
|
||||
return this->get_override("executables")();
|
||||
}
|
||||
|
||||
QString IPluginGameWrapper::steamAPPId() const
|
||||
{
|
||||
return this->get_override("steamAPPId")();
|
||||
}
|
||||
|
||||
QStringList IPluginGameWrapper::primaryPlugins() const
|
||||
{
|
||||
return this->get_override("primaryPlugins")();
|
||||
}
|
||||
|
||||
QStringList IPluginGameWrapper::gameVariants() const
|
||||
{
|
||||
return this->get_override("gameVariants")();
|
||||
}
|
||||
|
||||
void IPluginGameWrapper::setGameVariant(const QString & variant)
|
||||
{
|
||||
this->get_override("setGameVariant")(variant);
|
||||
}
|
||||
|
||||
QString IPluginGameWrapper::binaryName() const
|
||||
{
|
||||
return this->get_override("binaryName")();
|
||||
}
|
||||
|
||||
QString IPluginGameWrapper::gameShortName() const
|
||||
{
|
||||
return this->get_override("gameShortName")();
|
||||
}
|
||||
|
||||
QStringList IPluginGameWrapper::validShortNames() const
|
||||
{
|
||||
return this->get_override("validShortNames")();
|
||||
}
|
||||
|
||||
QString IPluginGameWrapper::gameNexusName() const
|
||||
{
|
||||
return this->get_override("gameNexusName")();
|
||||
}
|
||||
|
||||
QStringList IPluginGameWrapper::iniFiles() const
|
||||
{
|
||||
return this->get_override("iniFiles")();
|
||||
}
|
||||
|
||||
QStringList IPluginGameWrapper::DLCPlugins() const
|
||||
{
|
||||
return this->get_override("DLCPlugins")();
|
||||
}
|
||||
|
||||
QStringList IPluginGameWrapper::CCPlugins() const
|
||||
{
|
||||
return this->get_override("CCPlugins")();
|
||||
}
|
||||
|
||||
IPluginGame::LoadOrderMechanism IPluginGameWrapper::loadOrderMechanism() const
|
||||
{
|
||||
return this->get_override("loadorderMechanism")();
|
||||
}
|
||||
|
||||
IPluginGame::SortMechanism IPluginGameWrapper::sortMechanism() const
|
||||
{
|
||||
return this->get_override("sortMechanism")();
|
||||
}
|
||||
|
||||
int IPluginGameWrapper::nexusModOrganizerID() const
|
||||
{
|
||||
return this->get_override("nexusModOrganizerID")();
|
||||
}
|
||||
|
||||
int IPluginGameWrapper::nexusGameID() const
|
||||
{
|
||||
return this->get_override("nexusGameID")();
|
||||
}
|
||||
|
||||
bool IPluginGameWrapper::looksValid(QDir const & dir) const
|
||||
{
|
||||
return this->get_override("looksValid")(dir);
|
||||
}
|
||||
|
||||
QString IPluginGameWrapper::gameVersion() const
|
||||
{
|
||||
return this->get_override("gameVersion")();
|
||||
}
|
||||
|
||||
QString IPluginGameWrapper::getLauncherName() const
|
||||
{
|
||||
return this->get_override("getLauncherName")();
|
||||
}
|
||||
|
||||
bool IPluginGameWrapper::init(MOBase::IOrganizer * moInfo)
|
||||
{
|
||||
return this->get_override("init")(moInfo);
|
||||
}
|
||||
|
||||
QString IPluginGameWrapper::name() const
|
||||
{
|
||||
return this->get_override("name")();
|
||||
}
|
||||
|
||||
QString IPluginGameWrapper::author() const
|
||||
{
|
||||
return this->get_override("author")();
|
||||
}
|
||||
|
||||
QString IPluginGameWrapper::description() const
|
||||
{
|
||||
return this->get_override("description")();
|
||||
}
|
||||
|
||||
MOBase::VersionInfo IPluginGameWrapper::version() const
|
||||
{
|
||||
return this->get_override("version")();
|
||||
}
|
||||
|
||||
bool IPluginGameWrapper::isActive() const
|
||||
{
|
||||
return this->get_override("isActive")();
|
||||
}
|
||||
|
||||
QList<MOBase::PluginSetting> IPluginGameWrapper::settings() const
|
||||
{
|
||||
return this->get_override("settings")();
|
||||
}
|
||||
|
||||
std::map<std::type_index, boost::any> IPluginGameWrapper::featureList() const
|
||||
{
|
||||
return this->get_override("_featureList")();
|
||||
}
|
||||
/// end IPluginGame Wrapper
|
||||
/////////////////////////////////////
|
||||
/// IPluginInstallerCustom Wrapper
|
||||
|
||||
|
||||
|
||||
@@ -32,51 +32,51 @@ class IPluginGameWrapper : public MOBase::IPluginGame, public boost::python::wra
|
||||
Q_INTERFACES(MOBase::IPlugin MOBase::IPluginGame)
|
||||
|
||||
public:
|
||||
virtual QString gameName() const override { return this->get_override("gameName")(); }
|
||||
virtual void initializeProfile(const QDir &directory, ProfileSettings settings) const override {
|
||||
this->get_override("initializeProfile")(directory, settings);
|
||||
}
|
||||
virtual QString savegameExtension() const override { return this->get_override("savegameExtension")(); }
|
||||
virtual QString savegameSEExtension() const override { return this->get_override("savegameSEExtension")(); }
|
||||
virtual bool isInstalled() const override { return this->get_override("isInstalled")(); }
|
||||
virtual QIcon gameIcon() const override { return this->get_override("gameIcon")(); }
|
||||
virtual QDir gameDirectory() const override { return this->get_override("gameDirectory")(); }
|
||||
virtual QDir dataDirectory() const override { return this->get_override("dataDirectory")(); }
|
||||
virtual void setGamePath(const QString &path) override { this->get_override("setGamePath")(path); }
|
||||
virtual QDir documentsDirectory() const override { return this->get_override("documentsDirectory")(); }
|
||||
virtual QDir savesDirectory() const override { return this->get_override("savesDirectory")(); }
|
||||
virtual QList<MOBase::ExecutableInfo> executables() const override { return this->get_override("executables")(); }
|
||||
virtual QString steamAPPId() const override { return this->get_override("steamAPPId")(); }
|
||||
virtual QStringList primaryPlugins() const override { return this->get_override("primaryPlugins")(); }
|
||||
virtual QStringList gameVariants() const override { return this->get_override("gameVariants")(); }
|
||||
virtual void setGameVariant(const QString &variant) override { this->get_override("setGameVariant")(variant); }
|
||||
virtual QString binaryName() const override { return this->get_override("binaryName")(); }
|
||||
virtual QString gameShortName() const override { return this->get_override("gameShortName")(); }
|
||||
virtual QStringList validShortNames() const override { return this->get_override("validShortNames")(); }
|
||||
virtual QString gameNexusName() const override { return this->get_override("gameNexusName")(); }
|
||||
virtual QStringList iniFiles() const override { return this->get_override("iniFiles")(); }
|
||||
virtual QStringList DLCPlugins() const override { return this->get_override("DLCPlugins")(); }
|
||||
virtual QStringList CCPlugins() const override { return this->get_override("CCPlugins")(); }
|
||||
virtual LoadOrderMechanism loadOrderMechanism() const override { return this->get_override("loadorderMechanism")(); }
|
||||
virtual SortMechanism sortMechanism() const override { return this->get_override("sortMechanism")(); }
|
||||
virtual int nexusModOrganizerID() const override { return this->get_override("nexusModOrganizerID")(); }
|
||||
virtual int nexusGameID() const override { return this->get_override("nexusGameID")(); }
|
||||
virtual bool looksValid(QDir const &dir) const override { return this->get_override("looksValid")(dir); }
|
||||
virtual QString gameVersion() const override { return this->get_override("gameVersion")(); }
|
||||
virtual QString getLauncherName() const override { return this->get_override("getLauncherName")(); }
|
||||
virtual QString gameName() const override;
|
||||
virtual void initializeProfile(const QDir &directory, ProfileSettings settings) const override;
|
||||
virtual QString savegameExtension() const override;
|
||||
virtual QString savegameSEExtension() const override;
|
||||
virtual bool isInstalled() const override;
|
||||
virtual QIcon gameIcon() const override;
|
||||
virtual QDir gameDirectory() const override;
|
||||
virtual QDir dataDirectory() const override;
|
||||
virtual void setGamePath(const QString &path) override;
|
||||
virtual QDir documentsDirectory() const override;
|
||||
virtual QDir savesDirectory() const override;
|
||||
virtual QList<MOBase::ExecutableInfo> executables() const override;
|
||||
virtual QString steamAPPId() const override;
|
||||
virtual QStringList primaryPlugins() const override;
|
||||
virtual QStringList gameVariants() const override;
|
||||
virtual void setGameVariant(const QString &variant) override;
|
||||
virtual QString binaryName() const override;
|
||||
virtual QString gameShortName() const override;
|
||||
virtual QStringList validShortNames() const override;
|
||||
virtual QString gameNexusName() const override;
|
||||
virtual QStringList iniFiles() const override;
|
||||
virtual QStringList DLCPlugins() const override;
|
||||
virtual QStringList CCPlugins() const override;
|
||||
virtual LoadOrderMechanism loadOrderMechanism() const override;
|
||||
virtual SortMechanism sortMechanism() const override;
|
||||
virtual int nexusModOrganizerID() const override;
|
||||
virtual int nexusGameID() const override;
|
||||
virtual bool looksValid(QDir const &dir) const override;
|
||||
virtual QString gameVersion() const override;
|
||||
virtual QString getLauncherName() const override;
|
||||
|
||||
//Plugin interface. Could this bit be implemented just once?
|
||||
virtual bool init(MOBase::IOrganizer *moInfo) override { return this->get_override("init")(moInfo); }
|
||||
virtual QString name() const override { return this->get_override("name")(); }
|
||||
virtual QString author() const override { return this->get_override("author")(); }
|
||||
virtual QString description() const override { return this->get_override("description")(); }
|
||||
virtual MOBase::VersionInfo version() const override { return this->get_override("version")(); }
|
||||
virtual bool isActive() const override { return this->get_override("isActive")(); }
|
||||
virtual QList<MOBase::PluginSetting> settings() const override { return this->get_override("settings")(); }
|
||||
virtual bool init(MOBase::IOrganizer *moInfo) override;
|
||||
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;
|
||||
|
||||
protected:
|
||||
|
||||
virtual std::map<std::type_index, boost::any> featureList() const override { return this->get_override("featureList")(); }
|
||||
// TODO: implementing converters for this is required as otherwise Mod Organizer will crash on load when the game is being managed by this plugin
|
||||
// Apparently, Python developers interpret an underscore in a function name as it being protected
|
||||
virtual std::map<std::type_index, boost::any> featureList() const override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user