From 5b13704275fc3cf02f6c3f4d4bd77d32425ad2c9 Mon Sep 17 00:00:00 2001
From: isanae <14251494+isanae@users.noreply.github.com>
Date: Thu, 23 Jul 2020 01:32:53 -0400
Subject: moved profile, current game and game edition checks to
InstanceManager trying to centralize all of this stuff
---
src/instancemanager.h | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
(limited to 'src/instancemanager.h')
diff --git a/src/instancemanager.h b/src/instancemanager.h
index 649c2195..2331ebfd 100644
--- a/src/instancemanager.h
+++ b/src/instancemanager.h
@@ -24,18 +24,26 @@ along with Mod Organizer. If not, see .
#include
#include
+namespace MOBase { class IPluginGame; }
+
+class Settings;
+class PluginContainer;
class InstanceManager {
public:
-
static InstanceManager &instance();
- QString determineDataPath();
- void clearCurrentInstance();
-
void overrideInstance(const QString& instanceName);
+ void overrideProfile(const QString& profileName);
+
+ QString determineDataPath();
+ QString determineProfile(const Settings &settings);
+ bool determineGameEdition(Settings& settings, MOBase::IPluginGame* game);
+ MOBase::IPluginGame* determineCurrentGame(
+ const QString& moPath, Settings& settings, const PluginContainer &plugins);
+ void clearCurrentInstance();
QString currentInstance() const;
bool allowedToChangeInstance() const;
@@ -69,4 +77,6 @@ private:
bool m_Reset {false};
bool m_overrideInstance{false};
QString m_overrideInstanceName;
+ bool m_overrideProfile{false};
+ QString m_overrideProfileName;
};
--
cgit v1.3.1