mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Add minetest.get_modnames() to Lua API
This commit is contained in:
parent
e3ddbe8c6b
commit
136eb32389
3 changed files with 63 additions and 0 deletions
|
@ -4531,6 +4531,13 @@ const ModSpec* Server::getModSpec(const std::string &modname)
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
void Server::getModNames(core::list<std::string> &modlist)
|
||||
{
|
||||
for(core::list<ModSpec>::Iterator i = m_mods.begin(); i != m_mods.end(); i++)
|
||||
{
|
||||
modlist.push_back((*i).name);
|
||||
}
|
||||
}
|
||||
std::string Server::getBuiltinLuaPath()
|
||||
{
|
||||
return porting::path_share + DIR_DELIM + "builtin";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue