mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-24 05:15:22 +02:00
General code refactoring/improvements in server, treegen and connection
This commit is contained in:
@@ -22,12 +22,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "content/mod_configuration.h"
|
||||
#include <memory>
|
||||
|
||||
class MetricsBackend;
|
||||
class MetricCounter;
|
||||
class ServerScripting;
|
||||
|
||||
/**
|
||||
* Manage server mods
|
||||
* Manages server mods
|
||||
*
|
||||
* All new calls to this class must be tested in test_servermodmanager.cpp
|
||||
*/
|
||||
@@ -36,12 +34,20 @@ class ServerModManager
|
||||
ModConfiguration configuration;
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Creates a ServerModManager which targets worldpath
|
||||
* @param worldpath
|
||||
*/
|
||||
ServerModManager(const std::string &worldpath);
|
||||
void loadMods(ServerScripting *script);
|
||||
|
||||
/**
|
||||
* Creates an empty ServerModManager. For testing purposes.
|
||||
* Note: definition looks like this so it isn't accidentally used.
|
||||
*/
|
||||
explicit ServerModManager(std::nullptr_t) {};
|
||||
|
||||
void loadMods(ServerScripting &script);
|
||||
const ModSpec *getModSpec(const std::string &modname) const;
|
||||
void getModNames(std::vector<std::string> &modlist) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user