From 88c386d74d7d94ec16d4d84ed674eb51e31647ac Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Sun, 9 Jun 2024 12:18:17 +0200 Subject: Refactoring of game features for better management. (#2043) --- src/plugincontainer.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/plugincontainer.h') diff --git a/src/plugincontainer.h b/src/plugincontainer.h index d5ceca72..4854954d 100644 --- a/src/plugincontainer.h +++ b/src/plugincontainer.h @@ -24,6 +24,8 @@ class IUserInterface; #include #include +#include "game_features.h" + class OrganizerProxy; /** @@ -279,7 +281,7 @@ public: /** * @return the IPlugin interface to the currently managed game. */ - MOBase::IPlugin* managedGame() const; + MOBase::IPluginGame* managedGame() const; /** * @brief Check if the given plugin is enabled. @@ -337,10 +339,15 @@ public: */ QString topImplementedInterface(MOBase::IPlugin* plugin) const; + /** + * @return the game features. + */ + GameFeatures& gameFeatures() const { return *m_GameFeatures; } + /** * @return the preview generator. */ - const PreviewGenerator& previewGenerator() const; + const PreviewGenerator& previewGenerator() const { return m_PreviewGenerator; } /** * @return the list of plugin file names, including proxied plugins. @@ -476,6 +483,9 @@ private: // Main user interface, can be null until MW has been initialized. IUserInterface* m_UserInterface; + // Game features + std::unique_ptr m_GameFeatures; + PluginMap m_Plugins; // This maps allow access to IPlugin* from name or diagnose/mapper object. -- cgit v1.3.1