1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Redesign mod incompatibility message

This commit is contained in:
nordsoft
2023-09-23 00:32:48 +02:00
parent 60eef59bc9
commit dce1ac1538
16 changed files with 101 additions and 57 deletions

View File

@ -1765,8 +1765,17 @@ bool CGameHandler::load(const std::string & filename)
catch(const ModIncompatibility & e)
{
logGlobal->error("Failed to load game: %s", e.what());
auto errorMsg = VLC->generaltexth->translate("vcmi.server.errors.modsIncompatibility") + '\n';
errorMsg += e.what();
std::string errorMsg;
if(!e.whatMissing().empty())
{
errorMsg += VLC->generaltexth->translate("vcmi.server.errors.modsToEnable") + '\n';
errorMsg += e.whatMissing();
}
if(!e.whatExcessive().empty())
{
errorMsg += VLC->generaltexth->translate("vcmi.server.errors.modsToDisable") + '\n';
errorMsg += e.whatExcessive();
}
lobby->announceMessage(errorMsg);
return false;
}