mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Win/loss condition texts use MetaString
This commit is contained in:
@@ -5790,12 +5790,8 @@ void CGameHandler::checkVictoryLossConditionsForPlayer(PlayerColor player)
|
||||
void CGameHandler::getVictoryLossMessage(PlayerColor player, const EVictoryLossCheckResult & victoryLossCheckResult, InfoWindow & out) const
|
||||
{
|
||||
out.player = player;
|
||||
out.text.clear();
|
||||
out.text.appendRawString(VLC->generaltexth->translate(victoryLossCheckResult.messageToOthers));
|
||||
// hackish, insert one player-specific string, if applicable
|
||||
if (victoryLossCheckResult.messageToOthers.find("%s") != std::string::npos)
|
||||
out.text.replaceLocalString(EMetaText::COLOR, player.getNum());
|
||||
|
||||
out.text = victoryLossCheckResult.messageToOthers;
|
||||
out.text.replaceLocalString(EMetaText::COLOR, player.getNum());
|
||||
out.components.emplace_back(Component::EComponentType::FLAG, player.getNum(), 0, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user