diff --git a/android/assets/StatIcons/20xCityConnection5.png b/android/assets/StatIcons/20xCityConnection5.png new file mode 100644 index 0000000000..2ba55f9b69 Binary files /dev/null and b/android/assets/StatIcons/20xCityConnection5.png differ diff --git a/android/assets/jsons/Tutorials.json b/android/assets/jsons/Tutorials.json index 2e4bf9b3ec..f486eb2ffb 100644 --- a/android/assets/jsons/Tutorials.json +++ b/android/assets/jsons/Tutorials.json @@ -195,4 +195,14 @@ ] ], + SecondCity: [ + [ + "You have founded your second city!", + "Connecting your cities to the capital by roads", + " will generate gold via the trade route.", + "Note that each road costs 1 gold maintainance per turn, " + " so it may be more economical to wait until the cities grow!" + ] + ] + } diff --git a/android/build.gradle b/android/build.gradle index a89a8ec579..07ca93b58e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.game" minSdkVersion 14 targetSdkVersion 26 - versionCode 87 - versionName "2.5.3" + versionCode 89 + versionName "2.5.4.2" } buildTypes { release { diff --git a/core/src/com/unciv/UnCivGame.kt b/core/src/com/unciv/UnCivGame.kt index 0f865d6d29..2691ea575f 100644 --- a/core/src/com/unciv/UnCivGame.kt +++ b/core/src/com/unciv/UnCivGame.kt @@ -16,8 +16,7 @@ class UnCivGame : Game() { * This exists so that when debugging we can see the entire map. * Remember to turn this to false before commit and upload! */ - val viewEntireMapForDebug = true - + val viewEntireMapForDebug = false lateinit var worldScreen: WorldScreen diff --git a/core/src/com/unciv/logic/city/CityInfo.kt b/core/src/com/unciv/logic/city/CityInfo.kt index 60bd0a9dd5..52ed6251cc 100644 --- a/core/src/com/unciv/logic/city/CityInfo.kt +++ b/core/src/com/unciv/logic/city/CityInfo.kt @@ -14,8 +14,7 @@ import com.unciv.models.stats.Stats import kotlin.math.min class CityInfo { - @Transient - lateinit var civInfo: CivilizationInfo + @Transient lateinit var civInfo: CivilizationInfo var location: Vector2 = Vector2.Zero var name: String = "" var health = 200 diff --git a/core/src/com/unciv/logic/city/CityStats.kt b/core/src/com/unciv/logic/city/CityStats.kt index 7a47f0debb..afe5ec15ae 100644 --- a/core/src/com/unciv/logic/city/CityStats.kt +++ b/core/src/com/unciv/logic/city/CityStats.kt @@ -255,7 +255,7 @@ class CityStats { this.currentCityStats = stats } - private fun isConnectedToCapital(roadType: RoadStatus): Boolean { + fun isConnectedToCapital(roadType: RoadStatus): Boolean { if(cityInfo.civInfo.cities.count()<2) return false// first city! val capitalTile = cityInfo.civInfo.getCapital().getCenterTile() val tilesReached = HashSet() diff --git a/core/src/com/unciv/ui/tilegroups/TileGroup.kt b/core/src/com/unciv/ui/tilegroups/TileGroup.kt index 83300ab8df..bbdb73209b 100644 --- a/core/src/com/unciv/ui/tilegroups/TileGroup.kt +++ b/core/src/com/unciv/ui/tilegroups/TileGroup.kt @@ -215,8 +215,7 @@ open class TileGroup(var tileInfo: TileInfo) : Group() { } } if(improvementImage!=null){ - if(viewable) improvementImage!!.color= Color.WHITE - else improvementImage!!.color= Color.WHITE.cpy().apply { a=0.7f } + if(!viewable) improvementImage!!.color= Color.WHITE.cpy().apply { a=0.7f } } } diff --git a/core/src/com/unciv/ui/tilegroups/WorldTileGroup.kt b/core/src/com/unciv/ui/tilegroups/WorldTileGroup.kt index c324f97990..e0d4450961 100644 --- a/core/src/com/unciv/ui/tilegroups/WorldTileGroup.kt +++ b/core/src/com/unciv/ui/tilegroups/WorldTileGroup.kt @@ -1,13 +1,13 @@ package com.unciv.ui.tilegroups import com.badlogic.gdx.graphics.Color -import com.badlogic.gdx.scenes.scene2d.ui.Image import com.badlogic.gdx.scenes.scene2d.ui.Label import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.utils.Align import com.unciv.UnCivGame import com.unciv.logic.city.CityInfo import com.unciv.logic.map.MapUnit +import com.unciv.logic.map.RoadStatus import com.unciv.logic.map.TileInfo import com.unciv.models.gamebasics.unit.UnitType import com.unciv.ui.cityscreen.CityScreen @@ -101,9 +101,15 @@ class WorldTileGroup(tileInfo: TileInfo) : TileGroup(tileInfo) { add(fireImage).size(20f).padLeft(5f) } if(city.isCapital()){ - val starImage = Image(ImageGetter.getDrawable("OtherIcons/Star.png").tint(Color.LIGHT_GRAY)) + val starImage = ImageGetter.getImage("OtherIcons/Star.png").apply { color = Color.LIGHT_GRAY} add(starImage).size(20f).padLeft(5f) - } else{add()} // this is so the health bar is always 2 columns wide + } + else if (city.cityStats.isConnectedToCapital(RoadStatus.Road)){ + val connectionImage = ImageGetter.getStatIcon("CityConnection") + add(connectionImage).size(20f).padLeft(5f) + } + + else{add()} // this is so the health bar is always 2 columns wide add(label).pad(10f) pack() setOrigin(Align.center) diff --git a/core/src/com/unciv/ui/worldscreen/unit/UnitTable.kt b/core/src/com/unciv/ui/worldscreen/unit/UnitTable.kt index a7c6a1793e..4121c3fbe7 100644 --- a/core/src/com/unciv/ui/worldscreen/unit/UnitTable.kt +++ b/core/src/com/unciv/ui/worldscreen/unit/UnitTable.kt @@ -70,7 +70,7 @@ class UnitTable(val worldScreen: WorldScreen) : Table(){ if (unit.getBaseUnit().rangedStrength!=0) unitLabelText += "\n"+"Ranged strength".tr()+": "+unit.getBaseUnit().rangedStrength - unitLabelText += "\n"+"XP".tr()+": "+unit.promotions.XP + unitLabelText += "\n"+"XP".tr()+": "+unit.promotions.XP+"/"+unit.promotions.xpForNextPromotion() if(unit.isFortified() && unit.getFortificationTurns()>0) unitLabelText+="\n+"+unit.getFortificationTurns()*20+"% fortification"