mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Add ModMetadata API (#5131)
* mod can create a ModMetadata object where store its values and retrieve it. * Modmetadata object can only be fetched at mod loading * Save when modified using same time as map interval or at server stop * add helper function to get mod storage path * ModMetadata has exactly same calls than all every other Metadata
This commit is contained in:
parent
0680c47d6c
commit
ef6feca501
12 changed files with 384 additions and 12 deletions
|
@ -46,7 +46,7 @@ public:
|
|||
size_t size() const;
|
||||
bool contains(const std::string &name) const;
|
||||
const std::string &getString(const std::string &name, u16 recursion = 0) const;
|
||||
void setString(const std::string &name, const std::string &var);
|
||||
virtual bool setString(const std::string &name, const std::string &var);
|
||||
const StringMap &getStrings() const
|
||||
{
|
||||
return m_stringvars;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue