Resolved #9444 - Crop yield chart no longer displays score data

This commit is contained in:
Yair Morgenstern 2023-05-23 23:12:04 +03:00
parent e75742d3d6
commit 5fcfa6ac2d

View File

@ -50,7 +50,7 @@ class VictoryScreenCharts(
rankingTypeSelect.onChange {
rankingType = RankingType.values()
.firstOrNull { it.name == rankingTypeSelect.selected.value }
.firstOrNull { it.label == rankingTypeSelect.selected.value }
?: RankingType.Score
update()
}
@ -107,7 +107,8 @@ class VictoryScreenCharts(
civ.statsHistory
.filterValues { it.containsKey(rankingType) }
.map { (turn, data) -> Pair(turn, Pair(civ, data.getValue(rankingType))) }
}.groupBy({ it.first }, { it.second })
}
.groupBy({ it.first }, { it.second })
.mapValues { group -> group.value.toMap() }
}