From 4394dcda7a647905617b1c74c2f9d1b9b6cf9659 Mon Sep 17 00:00:00 2001 From: yairm210 Date: Mon, 23 Sep 2024 23:57:54 +0300 Subject: [PATCH] internal - Enable writing new format of civ ranking history --- .../unciv/logic/civilization/CivRankingHistory.kt | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/core/src/com/unciv/logic/civilization/CivRankingHistory.kt b/core/src/com/unciv/logic/civilization/CivRankingHistory.kt index 45527fe9e3..25475491fa 100644 --- a/core/src/com/unciv/logic/civilization/CivRankingHistory.kt +++ b/core/src/com/unciv/logic/civilization/CivRankingHistory.kt @@ -31,17 +31,9 @@ class CivRankingHistory : HashMap>(), IsPartOfGameInf override fun write(json: Json) { for ((turn, rankings) in this) { - // Old format - deprecated 4.12.18 - json.writeObjectStart(turn.toString()) - for ((rankingType, score) in rankings) { - json.writeValue(rankingType.idForSerialization.toString(), score) - } - json.writeObjectEnd() - - // New format (disabled) -// val rankingsString = rankings.entries -// .joinToString("") { it.key.idForSerialization.toString() + it.value } -// json.writeValue(turn.toString(), rankingsString) + val rankingsString = rankings.entries + .joinToString("") { it.key.idForSerialization.toString() + it.value } + json.writeValue(turn.toString(), rankingsString) } }