From 6c184947c3886ce80aa9eb9807a700025a344442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Fri, 16 Mar 2018 08:41:33 +0100 Subject: Server: delegate mod management & config to ServerModConfiguration (#7131) * Server: delegate mod management & config to ServerModConfiguration (rename it to ServerModManager) * Use c++11 range based loops * Add unittests + experimental/default mod as a test case to permit testing mod loading in future tests --- src/server.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/server.h') diff --git a/src/server.h b/src/server.h index b90971200..847642be9 100644 --- a/src/server.h +++ b/src/server.h @@ -61,6 +61,7 @@ class ServerEnvironment; struct SimpleSoundSpec; struct CloudParams; class ServerThread; +class ServerModManager; enum ClientDeletionReason { CDR_LEAVE, @@ -268,7 +269,7 @@ public: NodeDefManager* getWritableNodeDefManager(); IWritableCraftDefManager* getWritableCraftDefManager(); - virtual const std::vector &getMods() const { return m_mods; } + virtual const std::vector &getMods() const; virtual const ModSpec* getModSpec(const std::string &modname) const; void getModNames(std::vector &modlist); std::string getBuiltinLuaPath(); @@ -541,6 +542,7 @@ private: EventManager *m_event; // Mods + std::unique_ptr m_modmgr; std::vector m_mods; /* -- cgit v1.2.3