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:
parent
5e61f64ce2
commit
6c184947c3
13 changed files with 359 additions and 74 deletions
|
@ -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;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue