Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/summary/counters.js
Show All 12 Lines | |||||
function formatSummaryValue(values) | function formatSummaryValue(values) | ||||
{ | { | ||||
if (typeof values != "object") | if (typeof values != "object") | ||||
return values === Infinity ? g_InfinitySymbol : values; | return values === Infinity ? g_InfinitySymbol : values; | ||||
let ret = ""; | let ret = ""; | ||||
for (let type in values) | for (let type in values) | ||||
ret += (g_SummaryTypes[type].color ? | ret += (g_SummaryTypes[type].color ? | ||||
coloredText(values[type], g_SummaryTypes[type].color) : | setColor(values[type], g_SummaryTypes[type].color) : | ||||
values[type]) + g_SummaryTypes[type].postfix; | values[type]) + g_SummaryTypes[type].postfix; | ||||
return ret; | return ret; | ||||
} | } | ||||
function getPlayerValuesPerTeam(team, index, type, counters, headings) | function getPlayerValuesPerTeam(team, index, type, counters, headings) | ||||
{ | { | ||||
let fn = counters[headings.map(heading => heading.identifier).indexOf(type) - 1].fn; | let fn = counters[headings.map(heading => heading.identifier).indexOf(type) - 1].fn; | ||||
return g_Teams[team].map(player => fn(g_GameData.sim.playerStates[player], index, type)); | return g_Teams[team].map(player => fn(g_GameData.sim.playerStates[player], index, type)); | ||||
▲ Show 20 Lines • Show All 319 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator