Add stuff
This commit is contained in:
@ -58,11 +58,15 @@ func (msl MapScoreList) BuildTable() *ResultTable {
|
||||
|
||||
userMapRows := make(map[string]int)
|
||||
|
||||
rt.Header = append(rt.Header, make([]ResultTableHeader, len(msl))...)
|
||||
|
||||
for mapIndex, mapScore := range msl {
|
||||
rt.Header = append(rt.Header, ResultTableHeader{
|
||||
reversedIndex := len(msl) - 1 - mapIndex
|
||||
|
||||
rt.Header[reversedIndex+2] = ResultTableHeader{
|
||||
Title: mapScore.Map,
|
||||
Subtitle: timediff.TimeDiff(mapScore.StartTime),
|
||||
})
|
||||
}
|
||||
for _, score := range mapScore.ScoreList {
|
||||
if score.Ping > 0 {
|
||||
if _, ok := userMapRows[score.Name]; !ok {
|
||||
@ -77,7 +81,7 @@ func (msl MapScoreList) BuildTable() *ResultTable {
|
||||
|
||||
row := userMapRows[score.Name]
|
||||
rt.Rows[row].Total = rt.Rows[row].Total + score.Score
|
||||
rt.Rows[row].Individual[mapIndex] = score.Score
|
||||
rt.Rows[row].Individual[reversedIndex] = score.Score
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user