Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/common/gamedescription.js
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | for (let playerData of playerDataArray) | ||||
} | } | ||||
// Sort player descriptions by team | // Sort player descriptions by team | ||||
if (!playerDescriptions[teamIdx]) | if (!playerDescriptions[teamIdx]) | ||||
playerDescriptions[teamIdx] = []; | playerDescriptions[teamIdx] = []; | ||||
playerDescriptions[teamIdx].push(sprintf(playerDescription, { | playerDescriptions[teamIdx].push(sprintf(playerDescription, { | ||||
"playerName": | "playerName": | ||||
'[color="' + | coloredText( | ||||
(g_Buddies.indexOf(splitRatingFromNick(playerData.Name)[0]) != -1 ? g_BuddySymbol + " " : "") + | |||||
escapeText(playerData.Name), | |||||
(typeof getPlayerColor == 'function' ? | (typeof getPlayerColor == 'function' ? | ||||
(isAI ? "white" : getPlayerColor(playerData.Name)) : | (isAI ? "white" : getPlayerColor(playerData.Name)) : | ||||
rgbToGuiColor(playerData.Color || g_Settings.PlayerDefaults[playerIdx].Color)) + | rgbToGuiColor(playerData.Color || g_Settings.PlayerDefaults[playerIdx].Color))), | ||||
'"]' + | |||||
(g_Buddies.indexOf(splitRatingFromNick(playerData.Name)[0]) != -1 ? g_BuddySymbol + " " : "") + | |||||
escapeText(playerData.Name) + | |||||
"[/color]", | |||||
"civ": | "civ": | ||||
!playerData.Civ ? | !playerData.Civ ? | ||||
translate("Unknown Civilization") : | translate("Unknown Civilization") : | ||||
g_CivData && g_CivData[playerData.Civ] && g_CivData[playerData.Civ].Name ? | g_CivData && g_CivData[playerData.Civ] && g_CivData[playerData.Civ].Name ? | ||||
translate(g_CivData[playerData.Civ].Name) : | translate(g_CivData[playerData.Civ].Name) : | ||||
playerData.Civ, | playerData.Civ, | ||||
▲ Show 20 Lines • Show All 224 Lines • ▼ Show 20 Lines | if (extended) | ||||
titles.push({ | titles.push({ | ||||
"label": translate("Cheats"), | "label": translate("Cheats"), | ||||
"value": g_GameAttributes.settings.CheatsEnabled | "value": g_GameAttributes.settings.CheatsEnabled | ||||
}); | }); | ||||
} | } | ||||
return titles.map(title => sprintf(translate("%(label)s %(details)s"), { | return titles.map(title => sprintf(translate("%(label)s %(details)s"), { | ||||
"label": "[color=\"" + g_DescriptionHighlight + "\"]" + title.label + ":" + "[/color]", | "label": coloredText(title.label, g_DescriptionHighlight), | ||||
"details": | "details": | ||||
title.value === true ? translateWithContext("gamesetup option", "enabled") : | title.value === true ? translateWithContext("gamesetup option", "enabled") : | ||||
title.value || translateWithContext("gamesetup option", "disabled") | title.value || translateWithContext("gamesetup option", "disabled") | ||||
})).join("\n"); | })).join("\n"); | ||||
} | } | ||||
/** | /** | ||||
* Sets the win/defeat icon to indicate current player's state. | * Sets the win/defeat icon to indicate current player's state. | ||||
Show All 18 Lines |
Wildfire Games · Phabricator