1
0
forked from 0ad/0ad

display victory conditions when selecting a map, fixes #2727

This was SVN commit r16000.
This commit is contained in:
mimo 2014-11-21 18:30:17 +00:00
parent 0cc9cfd40c
commit d1cdf8f952

View File

@ -1267,8 +1267,12 @@ function onGameAttributesChange()
// Load the description from the map file, if there is one
var description = mapSettings.Description ? translate(mapSettings.Description) : translate("Sorry, no description available.");
// Describe the number of players
var playerString = sprintf(translatePlural("%(number)s player. %(description)s", "%(number)s players. %(description)s", numPlayers), { number: numPlayers, description: description });
// Describe the number of players and the victory conditions
var playerString = sprintf(translatePlural("%(number)s player. ", "%(number)s players. ", numPlayers), { number: numPlayers });
let victory = translate(victories.text[victoryIdx]);
if (victoryIdx != VICTORY_DEFAULTIDX)
victory = "[color=\"orange\"]" + victory + "[/color]";
playerString += translate("Victory Condition:") + " " + victory + ".\n\n" + description;
for (var i = 0; i < MAX_PLAYERS; ++i)
{