1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

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
This commit is contained in:
Loïc Blot 2018-03-16 08:41:33 +01:00 committed by GitHub
parent 5e61f64ce2
commit 6c184947c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 359 additions and 74 deletions

View file

@ -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<ModSpec> &getMods() const { return m_mods; }
virtual const std::vector<ModSpec> &getMods() const;
virtual const ModSpec* getModSpec(const std::string &modname) const;
void getModNames(std::vector<std::string> &modlist);
std::string getBuiltinLuaPath();
@ -541,6 +542,7 @@ private:
EventManager *m_event;
// Mods
std::unique_ptr<ServerModManager> m_modmgr;
std::vector<ModSpec> m_mods;
/*