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/content/mods.h | |
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/content/mods.h')
-rw-r--r-- | src/content/mods.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/content/mods.h b/src/content/mods.h index b56a97edb..dd3b6e0e6 100644 --- a/src/content/mods.h +++ b/src/content/mods.h @@ -31,6 +31,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "config.h" #include "metadata.h" +class ModMetadataDatabase; + #define MODNAME_ALLOWED_CHARS "abcdefghijklmnopqrstuvwxyz0123456789_" struct ModSpec @@ -149,20 +151,16 @@ class ModMetadata : public Metadata { public: ModMetadata() = delete; - ModMetadata(const std::string &mod_name); + ModMetadata(const std::string &mod_name, ModMetadataDatabase *database); ~ModMetadata() = default; virtual void clear(); - bool save(const std::string &root_path); - bool load(const std::string &root_path); - - bool isModified() const { return m_modified; } const std::string &getModName() const { return m_mod_name; } virtual bool setString(const std::string &name, const std::string &var); private: std::string m_mod_name; - bool m_modified = false; + ModMetadataDatabase *m_database; }; |