Sort game speeds in Civilopedia by game speed modifier (#7408)

This commit is contained in:
OptimizedForDensity 2022-07-09 15:49:37 -04:00 committed by GitHub
parent b21f616120
commit 43da7ee3cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,6 +74,7 @@ class Speed : RulesetObject(), IsPartOfGameInfoSerialization {
yield(FormattedLine("Peace deal duration: [$peaceDealDuration] turns${Fonts.turn}"))
yield(FormattedLine("Start year: [" + ("{[${abs(startYear).toInt()}] " + (if (startYear < 0) "BC" else "AD") + "}]").tr()))
}.toList()
override fun getSortGroup(ruleset: Ruleset): Int = (modifier * 1000).toInt()
fun numTotalTurns(): Int = yearsPerTurn.last().untilTurn
}