1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 00:55:20 +02:00

Load media from subfolders (#9065)

This commit is contained in:
DS
2020-08-20 22:25:29 +02:00
committed by GitHub
parent 9c7340104a
commit 98faeac5a7
7 changed files with 34 additions and 21 deletions

View File

@@ -99,10 +99,10 @@ void ServerModManager::getModNames(std::vector<std::string> &modlist) const
void ServerModManager::getModsMediaPaths(std::vector<std::string> &paths) const
{
for (const ModSpec &spec : m_sorted_mods) {
paths.push_back(spec.path + DIR_DELIM + "textures");
paths.push_back(spec.path + DIR_DELIM + "sounds");
paths.push_back(spec.path + DIR_DELIM + "media");
paths.push_back(spec.path + DIR_DELIM + "models");
paths.push_back(spec.path + DIR_DELIM + "locale");
fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "textures");
fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "sounds");
fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "media");
fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "models");
fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "locale");
}
}