Handle incompatible mods for Atlas

In case of incompatible mods listed on the command line we can't launch
the mod selector from Atlas. Instead list the offending mods and launch
with the default mods.

Fixes: #8852
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
Ralph Sennhauser 2026-07-11 20:05:10 +02:00
parent f4bb99094d
commit 38d247467f
No known key found for this signature in database

View file

@ -533,9 +533,16 @@ bool Init(const CmdLineArgs& args, int flags)
} }
} }
} }
// If there are incompatible mods, switch to the mod selector so players can resolve the problem. // If there are incompatible mods, switch to the mod selector if available
// so players can resolve the problem, otherwise just complain and load
// default mods.
if (g_Mods.GetIncompatibleMods().empty()) if (g_Mods.GetIncompatibleMods().empty())
MountMods(Paths(args), g_Mods.GetEnabledMods()); MountMods(Paths(args), g_Mods.GetEnabledMods());
else if (flags & INIT_NO_GUI)
{
LOGERROR("Trying to start with incompatible mods: %s.", boost::algorithm::join(g_Mods.GetIncompatibleMods(), ", "));
MountMods(Paths(args), { "mod", "public" });
}
else else
MountMods(Paths(args), { "mod" }); MountMods(Paths(args), { "mod" });