1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-17 17:08:39 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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");
}
}