Razed cities now have a fire icon next to them
This commit is contained in:
parent
29245118a6
commit
bcd5f02bec
4 changed files with 28 additions and 13 deletions
BIN
android/assets/OtherIcons/Fire.png
Normal file
BIN
android/assets/OtherIcons/Fire.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5 KiB |
|
@ -128,6 +128,11 @@ class CityScreen(internal val city: CityInfo) : CameraStageBaseScreen() {
|
|||
cityPickerTable.add(prevCityButton).pad(20f)
|
||||
}
|
||||
|
||||
if(city.isBeingRazed){
|
||||
val fireImage = ImageGetter.getImage("OtherIcons/Fire.png")
|
||||
cityPickerTable.add(fireImage).size(20f).padRight(5f)
|
||||
}
|
||||
|
||||
if(city.isCapital()){
|
||||
val starImage = Image(ImageGetter.getDrawable("OtherIcons/Star.png").tint(Color.LIGHT_GRAY))
|
||||
cityPickerTable.add(starImage).size(20f).padRight(5f)
|
||||
|
|
|
@ -92,12 +92,16 @@ class WorldTileGroup(tileInfo: TileInfo) : TileGroup(tileInfo) {
|
|||
val emptyPartOfBar = ImageGetter.getImage(ImageGetter.WhiteDot).apply { color = Color.BLACK }
|
||||
healthBar.add(healthPartOfBar).width(healthBarSize * healthPercent).height(5f)
|
||||
healthBar.add(emptyPartOfBar).width(healthBarSize * (1 - healthPercent)).height(5f)
|
||||
add(healthBar).colspan(2).row()
|
||||
add(healthBar).colspan(3).row()
|
||||
}
|
||||
|
||||
if(city.isBeingRazed){
|
||||
val fireImage = ImageGetter.getImage("OtherIcons/Fire.png")
|
||||
add(fireImage).size(20f).padLeft(5f)
|
||||
}
|
||||
if(city.isCapital()){
|
||||
val starImage = Image(ImageGetter.getDrawable("OtherIcons/Star.png").tint(Color.LIGHT_GRAY))
|
||||
add(starImage).size(20f).padLeft(10f)
|
||||
add(starImage).size(20f).padLeft(5f)
|
||||
} else{add()} // this is so the health bar is always 2 columns wide
|
||||
add(label).pad(10f)
|
||||
pack()
|
||||
|
|
|
@ -126,23 +126,29 @@ class WorldScreen : CameraStageBaseScreen() {
|
|||
|
||||
kotlin.concurrent.thread {
|
||||
game.gameInfo.nextTurn()
|
||||
shouldUpdate=true
|
||||
GameSaver().saveGame(game.gameInfo, "Autosave")
|
||||
|
||||
// If we put this BEFORE the save game, then we try to save the game...
|
||||
// but the main thread does other stuff, including showing tutorials which guess what? Changes the game data
|
||||
// BOOM! Exception!
|
||||
// That's why this needs to be after the game is saved.
|
||||
shouldUpdate=true
|
||||
|
||||
nextTurnButton.setText("Next turn".tr())
|
||||
nextTurnButton.enable()
|
||||
Gdx.input.inputProcessor = stage
|
||||
|
||||
displayTutorials("NextTurn")
|
||||
|
||||
if(civInfo.happiness<0)
|
||||
displayTutorials("Unhappiness")
|
||||
|
||||
if(civInfo.goldenAges.isGoldenAge())
|
||||
displayTutorials("GoldenAge")
|
||||
|
||||
if(gameInfo.turns>=100)
|
||||
displayTutorials("ContactMe")
|
||||
}
|
||||
displayTutorials("NextTurn")
|
||||
|
||||
if(civInfo.happiness<0)
|
||||
displayTutorials("Unhappiness")
|
||||
|
||||
if(civInfo.goldenAges.isGoldenAge())
|
||||
displayTutorials("GoldenAge")
|
||||
|
||||
if(gameInfo.turns>=100)
|
||||
displayTutorials("ContactMe")
|
||||
}
|
||||
|
||||
return nextTurnButton
|
||||
|
|
Loading…
Reference in a new issue