#include "scripting_server.h"
#include "content/subgames.h"
#include "porting.h"
+#include "util/metricsbackend.h"
/**
* Manage server mods
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");
+ for (auto it = m_sorted_mods.crbegin(); it != m_sorted_mods.crend(); it++) {
+ const ModSpec &spec = *it;
+ 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");
}
}