diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-01-07 13:28:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-07 20:28:49 +0200 |
commit | bf22569019749e421e8ffe0a73cff988a9a9c846 (patch) | |
tree | 9e6910c1faf0ddce191ad4b3110f08b0201fc482 /src/unittest/test.cpp | |
parent | b81948a14c138517f6a227dac5b71f0b2facb33c (diff) | |
download | minetest-bf22569019749e421e8ffe0a73cff988a9a9c846.tar.gz minetest-bf22569019749e421e8ffe0a73cff988a9a9c846.tar.bz2 minetest-bf22569019749e421e8ffe0a73cff988a9a9c846.zip |
Use a database for mod storage (#11763)
Diffstat (limited to 'src/unittest/test.cpp')
-rw-r--r-- | src/unittest/test.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/unittest/test.cpp b/src/unittest/test.cpp index af324e1b1..f223d567e 100644 --- a/src/unittest/test.cpp +++ b/src/unittest/test.cpp @@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "gamedef.h" #include "modchannels.h" #include "content/mods.h" +#include "database/database-dummy.h" #include "util/numeric.h" #include "porting.h" @@ -55,6 +56,7 @@ public: scene::ISceneManager *getSceneManager() { return m_scenemgr; } IRollbackManager *getRollbackManager() { return m_rollbackmgr; } EmergeManager *getEmergeManager() { return m_emergemgr; } + ModMetadataDatabase *getModStorageDatabase() { return m_mod_storage_database; } scene::IAnimatedMesh *getMesh(const std::string &filename) { return NULL; } bool checkLocalPrivilege(const std::string &priv) { return false; } @@ -68,7 +70,6 @@ public: return testmodspec; } virtual const ModSpec* getModSpec(const std::string &modname) const { return NULL; } - virtual std::string getModStoragePath() const { return "."; } virtual bool registerModStorage(ModMetadata *meta) { return true; } virtual void unregisterModStorage(const std::string &name) {} bool joinModChannel(const std::string &channel); @@ -89,11 +90,13 @@ private: scene::ISceneManager *m_scenemgr = nullptr; IRollbackManager *m_rollbackmgr = nullptr; EmergeManager *m_emergemgr = nullptr; + ModMetadataDatabase *m_mod_storage_database = nullptr; std::unique_ptr<ModChannelMgr> m_modchannel_mgr; }; TestGameDef::TestGameDef() : + m_mod_storage_database(new Database_Dummy()), m_modchannel_mgr(new ModChannelMgr()) { m_itemdef = createItemDefManager(); @@ -107,6 +110,7 @@ TestGameDef::~TestGameDef() { delete m_itemdef; delete m_nodedef; + delete m_mod_storage_database; } |