Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/common/functions_utility.js
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | for (let team in teamList) | ||||
{ | { | ||||
pData.Team = team; | pData.Team = team; | ||||
playerData.push(pData); | playerData.push(pData); | ||||
} | } | ||||
return playerData; | return playerData; | ||||
} | } | ||||
function translateMapTitle(mapTitle) | |||||
{ | |||||
return mapTitle == "random" ? translateWithContext("map selection", "Random") : translate(mapTitle); | |||||
} | |||||
function removeDupes(array) | function removeDupes(array) | ||||
{ | { | ||||
// loop backwards to make splice operations cheaper | // loop backwards to make splice operations cheaper | ||||
let i = array.length; | let i = array.length; | ||||
while (i--) | while (i--) | ||||
if (array.indexOf(array[i]) != i) | if (array.indexOf(array[i]) != i) | ||||
array.splice(i, 1); | array.splice(i, 1); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator