From 06635690c4a9a3686967fa475db31646e838a0ec Mon Sep 17 00:00:00 2001 From: ConfiG Date: Sun, 10 Sep 2023 19:14:00 +0300 Subject: [PATCH] bring unknown problems back --- loader/src/loader/LoaderImpl.cpp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/loader/src/loader/LoaderImpl.cpp b/loader/src/loader/LoaderImpl.cpp index 61afcb13..bb84caba 100644 --- a/loader/src/loader/LoaderImpl.cpp +++ b/loader/src/loader/LoaderImpl.cpp @@ -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(item.cause) && - // std::get(item.cause).getID() == myEpicMod->getID() || - // std::holds_alternative(item.cause) && - // std::get(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("should-load-" + mod->getID(), true) && + !std::any_of(m_problems.begin(), m_problems.end(), [myEpicMod](auto& item) { + return std::holds_alternative(item.cause) && + std::get(item.cause).getID() == myEpicMod->getID() || + std::holds_alternative(item.cause) && + std::get(item.cause) == myEpicMod; + })) { + m_problems.push_back({ + LoadProblem::Type::Unknown, + mod, + "" + }); + log::error("{} failed to load for an unknown reason", id); + } log::popNest(); }