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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user