Cities connected to capital have a connected symbol next to them
Unit information displays XP to next promotion
This commit is contained in:
parent
415add2417
commit
bed7a37a6b
9 changed files with 26 additions and 13 deletions
BIN
android/assets/StatIcons/20xCityConnection5.png
Normal file
BIN
android/assets/StatIcons/20xCityConnection5.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -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!"
|
||||
]
|
||||
]
|
||||
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<TileInfo>()
|
||||
|
|
|
@ -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 }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue