update generators scanning

This commit is contained in:
MihailRis
2024-09-27 23:55:14 +03:00
parent 39030efd74
commit c46090f881
14 changed files with 46 additions and 9 deletions
+10 -1
View File
@@ -51,13 +51,22 @@ static void detect_defs(
}
if (fs::is_regular_file(file) && files::is_data_file(file)) {
detected.push_back(prefix.empty() ? name : prefix + ":" + name);
} else if (fs::is_directory(file)) {
} else if (fs::is_directory(file) &&
file.extension() != fs::u8path(".files")) {
detect_defs(file, name, detected);
}
}
}
}
std::vector<std::string> ContentLoader::scanContent(
const ContentPack& pack, ContentType type
) {
std::vector<std::string> detected;
detect_defs(pack.folder / ContentPack::getFolderFor(type), pack.id, detected);
return detected;
}
bool ContentLoader::fixPackIndices(
const fs::path& folder,
dv::value& indicesRoot,