mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Add MetaDataRef:get_keys (#12841)
This commit is contained in:
parent
1a045da0dd
commit
cd8a7fe472
20 changed files with 125 additions and 0 deletions
|
@ -247,6 +247,13 @@ const StringMap &ModMetadata::getStrings(StringMap *place) const
|
|||
return *place;
|
||||
}
|
||||
|
||||
const std::vector<std::string> &ModMetadata::getKeys(std::vector<std::string> *place) const
|
||||
{
|
||||
place->clear();
|
||||
m_database->getModKeys(m_mod_name, place);
|
||||
return *place;
|
||||
}
|
||||
|
||||
const std::string *ModMetadata::getStringRaw(const std::string &name, std::string *place) const
|
||||
{
|
||||
return m_database->getModEntry(m_mod_name, name, place) ? place : nullptr;
|
||||
|
|
|
@ -127,6 +127,8 @@ public:
|
|||
|
||||
const StringMap &getStrings(StringMap *place) const override;
|
||||
|
||||
const std::vector<std::string> &getKeys(std::vector<std::string> *place) const override;
|
||||
|
||||
protected:
|
||||
const std::string *getStringRaw(const std::string &name,
|
||||
std::string *place) const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue