From 4a69544c7d96cf6424c400f719e2fe5d6b44eb1e Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sat, 30 May 2020 23:40:27 +0300 Subject: [PATCH] Resolved #2672 - Difficulties are sorted by ascending difficulty in Civilopedia --- core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt | 2 +- core/src/com/unciv/ui/CivilopediaScreen.kt | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt b/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt index ed9438afc0..21267faa4f 100644 --- a/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt +++ b/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt @@ -28,7 +28,7 @@ class UnitMovementAlgorithms(val unit:MapUnit) { (!areConnectedByRoad || !civInfo.tech.roadsConnectAcrossRivers)){ return 100f // Rivers take the entire turn to cross } - + if (areConnectedByRoad) { return if (unit.civInfo.tech.movementSpeedOnRoadsImproved) 1 / 3f + extraCost diff --git a/core/src/com/unciv/ui/CivilopediaScreen.kt b/core/src/com/unciv/ui/CivilopediaScreen.kt index e89afbaf9d..e71430d382 100644 --- a/core/src/com/unciv/ui/CivilopediaScreen.kt +++ b/core/src/com/unciv/ui/CivilopediaScreen.kt @@ -27,8 +27,10 @@ class CivilopediaScreen(ruleset: Ruleset) : CameraStageBaseScreen() { fun select(category: String) { entrySelectTable.clear() - for (entry in categoryToEntries[category]!! - .sortedBy { it.name.tr() }){ // Alphabetical order of localized names + var entries = categoryToEntries[category]!! + if(category!="Difficulty levels") // this is the only case where we need them in order + entries = entries.sortedBy { it.name.tr() } // Alphabetical order of localized names + for (entry in entries){ val entryButton = Button(skin) if(entry.image!=null) if (category=="Terrains")