1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Announce handicap in welcome message

This commit is contained in:
Laserlicht 2024-07-16 00:58:59 +02:00
parent fea491be82
commit afd580b76a

View File

@ -1034,6 +1034,17 @@ void CVCMIServer::multiplayerWelcomeMessage()
gh->playerMessages->broadcastSystemMessage("Use '!help' to list available commands");
for (const auto & pi : si->playerInfos)
if(pi.second.isControlledByHuman() && !pi.second.handicap.empty())
{
MetaString str;
str.appendTextID("vcmi.lobby.handicap");
str.appendRawString(" ");
str.appendName(pi.first);
str.appendRawString(": " + pi.second.handicap.toString());
announceTxt(str);
}
std::vector<std::string> optionIds;
if(si->extraOptionsInfo.cheatsAllowed)
optionIds.emplace_back("vcmi.optionsTab.cheatAllowed.hover");