Differential D2385 Diff 10187 binaries/data/mods/public/gui/session/lobby/LobbyRatingReport/Units.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/session/lobby/LobbyRatingReport/Units.js
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
/** | |||||
* This class reports the units trained, lost and killed of some selected unit classes. | |||||
*/ | |||||
LobbyRatingReport.prototype.Units = class | |||||
{ | |||||
InsertValues(report, extenededSimState, playerStates) | |||||
{ | |||||
let lower = txt => txt.substr(0, 1).toLowerCase() + txt.substr(1); | |||||
let time = playerStates[0].sequences.time.length - 1; | |||||
for (let unitClass in playerStates[0].sequences.unitsTrained) | |||||
report[lower(unitClass) + "UnitsTrained"] = playerStates.map(playerState => | |||||
playerState.sequences.unitsTrained[unitClass][time]).join(",") + ","; | |||||
for (let unitClass in playerStates[0].sequences.unitsLost) | |||||
report[lower(unitClass) + "UnitsLost"] = playerStates.map(playerState => | |||||
playerState.sequences.unitsLost[unitClass][time]).join(",") + ","; | |||||
for (let unitClass in playerStates[0].sequences.enemyUnitsKilled) | |||||
report["enemy" + unitClass + "UnitsKilled"] = playerStates.map(playerState => | |||||
playerState.sequences.enemyUnitsKilled[unitClass][time]).join(",") + ","; | |||||
} | |||||
}; |
Wildfire Games · Phabricator