bring unknown problems back

This commit is contained in:
ConfiG 2023-09-10 19:14:00 +03:00
parent 8f39c38851
commit 06635690c4
No known key found for this signature in database
GPG key ID: 44DA1983F524C11B

View file

@ -493,19 +493,21 @@ void Loader::Impl::findProblems() {
Mod* myEpicMod = mod; // clang fix
// if the mod is not loaded but there are no problems related to it
// if (!mod->isLoaded() && !std::any_of(m_problems.begin(), m_problems.end(), [myEpicMod](auto& item) {
// return std::holds_alternative<ModMetadata>(item.cause) &&
// std::get<ModMetadata>(item.cause).getID() == myEpicMod->getID() ||
// std::holds_alternative<Mod*>(item.cause) &&
// std::get<Mod*>(item.cause) == myEpicMod;
// })) {
// m_problems.push_back({
// LoadProblem::Type::Unknown,
// mod,
// ""
// });
// log::error("{} failed to load for an unknown reason", id);
// }
if (!mod->isLoaded() &&
Mod::get()->getSavedValue<bool>("should-load-" + mod->getID(), true) &&
!std::any_of(m_problems.begin(), m_problems.end(), [myEpicMod](auto& item) {
return std::holds_alternative<ModMetadata>(item.cause) &&
std::get<ModMetadata>(item.cause).getID() == myEpicMod->getID() ||
std::holds_alternative<Mod*>(item.cause) &&
std::get<Mod*>(item.cause) == myEpicMod;
})) {
m_problems.push_back({
LoadProblem::Type::Unknown,
mod,
""
});
log::error("{} failed to load for an unknown reason", id);
}
log::popNest();
}