aboutsummaryrefslogtreecommitdiff
path: root/src/server/mods.h
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2022-05-07 16:44:46 +0100
committerrubenwardy <rw@rubenwardy.com>2022-07-14 22:12:54 +0100
commit06de82fd86678e0a1c260c67792c5cd192863edd (patch)
tree82f7fb040860fd3d099ddce43be2710b120da083 /src/server/mods.h
parent1d512ef7f4071fadf10078825ce83e77a3707f06 (diff)
downloadminetest-06de82fd86678e0a1c260c67792c5cd192863edd.tar.gz
minetest-06de82fd86678e0a1c260c67792c5cd192863edd.tar.bz2
minetest-06de82fd86678e0a1c260c67792c5cd192863edd.zip
Refactor ModConfiguration
Diffstat (limited to 'src/server/mods.h')
-rw-r--r--src/server/mods.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/server/mods.h b/src/server/mods.h
index 8954bbf72..1d1b42d0f 100644
--- a/src/server/mods.h
+++ b/src/server/mods.h
@@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
-#include "content/mods.h"
+#include "content/mod_configuration.h"
#include <memory>
class MetricsBackend;
@@ -31,8 +31,10 @@ class ServerScripting;
*
* All new calls to this class must be tested in test_servermodmanager.cpp
*/
-class ServerModManager : public ModConfiguration
+class ServerModManager
{
+ ModConfiguration configuration;
+
public:
/**
* Creates a ServerModManager which targets worldpath
@@ -42,6 +44,23 @@ public:
void loadMods(ServerScripting *script);
const ModSpec *getModSpec(const std::string &modname) const;
void getModNames(std::vector<std::string> &modlist) const;
+
+ inline const std::vector<ModSpec> &getMods() const {
+ return configuration.getMods();
+ }
+
+ inline const std::vector<ModSpec> &getUnsatisfiedMods() const {
+ return configuration.getUnsatisfiedMods();
+ }
+
+ inline bool isConsistent() const {
+ return configuration.isConsistent();
+ }
+
+ inline void printUnsatisfiedModsError() const {
+ return configuration.printUnsatisfiedModsError();
+ }
+
/**
* Recursively gets all paths of mod folders that can contain media files.
*