diff --git a/android/assets/jsons/Buildings.json b/android/assets/jsons/Buildings.json index ecb4a98b40..12e9271ab8 100644 --- a/android/assets/jsons/Buildings.json +++ b/android/assets/jsons/Buildings.json @@ -280,7 +280,7 @@ name:"Harbor", maintenance:2, hurryCostModifier:25, - uniques:["+1 production from all sea resources worked by the city","Connects trade routes over water"] + uniques:["+1 production from all sea resources worked by the city","Connects trade routes over water"] // todo - trade routes over water! requiredTech:"Compass" }, { diff --git a/android/build.gradle b/android/build.gradle index 1718ec1f7b..3c5cfce703 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.game" minSdkVersion 14 targetSdkVersion 26 - versionCode 151 - versionName "2.9.5" + versionCode 152 + versionName "2.9.6" } buildTypes { release { diff --git a/core/src/com/unciv/UnCivGame.kt b/core/src/com/unciv/UnCivGame.kt index 8f488cde9e..8e3379c103 100644 --- a/core/src/com/unciv/UnCivGame.kt +++ b/core/src/com/unciv/UnCivGame.kt @@ -27,20 +27,16 @@ class UnCivGame : Game() { GameBasics.run { } // just to initialize the GameBasics settings = GameSaver().getGeneralSettings() if (GameSaver().getSave("Autosave").exists()) { - try { +// try { loadGame("Autosave") - } catch (ex: Exception) { // silent fail if we can't read the autosave - startNewGame() - } +// } catch (ex: Exception) { // silent fail if we can't read the autosave +// startNewGame() +// } } else startNewGame() // screen=LanguagePickerScreen() disabled because of people's negative reviews =( } fun loadGame(gameInfo:GameInfo){ - // As of 2.9.6, removed hydro plat, since it requires rivers, which we do not yet have - gameInfo.civilizations.flatMap { it.cities }.map { it.cityConstructions } - .forEach{if("Hydro Plant" in it.builtBuildings) it.builtBuildings.remove("Hydro Plant")} - this.gameInfo = gameInfo if(settings.tutorialsShown.isEmpty() && this.gameInfo.tutorial.isNotEmpty()) settings.tutorialsShown.addAll(this.gameInfo.tutorial) diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index a5f12723d9..ca8a042d51 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -95,8 +95,19 @@ class GameInfo { } for (civInfo in civilizations) - for (cityInfo in civInfo.cities) + for (cityInfo in civInfo.cities) { + + val cityConstructions = cityInfo.cityConstructions + // As of 2.9.6, removed hydro plant, since it requires rivers, which we do not yet have + if("Hydro Plant" in cityConstructions.builtBuildings) + cityConstructions.builtBuildings.remove("Hydro Plant") + if(cityConstructions.currentConstruction=="Hydro Plant") { + cityConstructions.currentConstruction="" + cityConstructions.chooseNextConstruction() + } + cityInfo.cityStats.update() + } } } \ No newline at end of file diff --git a/core/src/com/unciv/logic/city/CityInfo.kt b/core/src/com/unciv/logic/city/CityInfo.kt index bca3920668..6a0b629781 100644 --- a/core/src/com/unciv/logic/city/CityInfo.kt +++ b/core/src/com/unciv/logic/city/CityInfo.kt @@ -154,6 +154,7 @@ class CityInfo { expansion.setTransients() cityStats.cityInfo = this cityConstructions.cityInfo = this + } fun endTurn() {