only show whether mods are loaded in crashlog

This commit is contained in:
ConfiG 2023-09-11 14:07:49 +03:00
parent bb431ee1dc
commit 5b7d3183bb
No known key found for this signature in database
GPG key ID: 44DA1983F524C11B

View file

@ -24,14 +24,13 @@ static void printGeodeInfo(std::stringstream& stream) {
static void printMods(std::stringstream& stream) {
auto mods = Loader::get()->getAllMods();
if (!mods.size()) {
if (mods.empty()) {
stream << "<None>\n";
}
using namespace std::string_view_literals;
for (auto& mod : mods) {
stream << fmt::format("{:>8} | {:>8} | [{}] {}\n",
mod->isLoaded() ? "Loaded"sv : "Unloaded"sv,
mod->isEnabled() ? "Enabled"sv : "Disabled"sv,
stream << fmt::format("{} | [{}] {}\n",
mod->isLoaded() ? "x"sv : " "sv,
mod->getVersion().toString(), mod->getID()
);
}