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

@ -552,10 +552,17 @@ bool CServerHandler::validateGameStart(bool allowOnlyAI) const
catch(ModIncompatibility & e)
{
logGlobal->warn("Incompatibility exception during start scenario: %s", e.what());
auto errorMsg = CGI->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();
}
showServerError(errorMsg);
return false;
}