From 478a9e6996a04ed7c8291ab06391cf0cebc5be8e Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 23 Jan 2019 20:52:26 +0200 Subject: [PATCH] Resolved #429 - display era names only once in tech picker screen --- android/build.gradle | 4 ++-- core/src/com/unciv/logic/GameInfo.kt | 5 ----- .../unciv/ui/pickerscreens/TechPickerScreen.kt | 18 ++++++++++++++++-- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 07f881551e..cc136f6d93 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.app" minSdkVersion 14 targetSdkVersion 28 - versionCode 194 - versionName "2.12.3" + versionCode 195 + versionName "2.12.4" } // Had to add this crap for Travis to build, it wanted to sign the app diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index e8c8e18796..056a15a8f0 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -58,11 +58,6 @@ class GameInfo { while(thisPlayer.playerType==PlayerType.AI){ NextTurnAutomation().automateCivMoves(thisPlayer) - // if (thisPlayer.tech.techsToResearch.isEmpty()) { // should belong in automation? yes/no? - // val researchableTechs = GameBasics.Technologies.values - // .filter { !thisPlayer.tech.isResearched(it.name) && thisPlayer.tech.canBeResearched(it.name) } - // thisPlayer.tech.techsToResearch.add(researchableTechs.minBy { it.cost }!!.name) - // } switchTurn() } diff --git a/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt b/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt index 3db4b0e11d..0bbd86301d 100644 --- a/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt +++ b/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt @@ -10,6 +10,7 @@ import com.unciv.models.gamebasics.tech.Technology import com.unciv.models.gamebasics.tr import com.unciv.ui.utils.* import java.util.* +import kotlin.collections.HashSet class TechPickerScreen(internal val civInfo: CivilizationInfo) : PickerScreen() { @@ -49,10 +50,12 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo) : PickerScreen() techMatrix[technology.column!!.columnNumber][technology.row - 1] = technology } + val alreadyDisplayedEras = HashSet() val eras = ArrayList