Resolved #2640 - Difficulty level shown in victory status screen

This commit is contained in:
Yair Morgenstern 2020-07-07 23:05:27 +03:00
parent a06a4531be
commit 210011fb15
3 changed files with 8 additions and 4 deletions

View file

@ -537,8 +537,7 @@ class TileEditorOptionsTable(val mapEditorScreen: MapEditorScreen): Table(Camera
// Allow barbarian camps, ruins and similar without clear
-> if (topTerrain.unbuildable && improvement.isGreatImprovement())
tileInfo.terrainFeature = null
topTerrain.unbuildable
-> tileInfo.improvement = null // forbid on unbuildable feature
topTerrain.unbuildable -> tileInfo.improvement = null // forbid on unbuildable feature
"Can only be built on Coastal tiles" in improvement.uniques && tileInfo.isCoastalTile()
-> Unit // allow Moai where appropriate
else -> tileInfo.improvement = null

View file

@ -3,6 +3,7 @@ package com.unciv.ui.victoryscreen
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.scenes.scene2d.ui.Table
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
import com.badlogic.gdx.utils.Align
import com.unciv.logic.civilization.CivilizationInfo
import com.unciv.models.ruleset.VictoryType
import com.unciv.models.translations.tr
@ -25,6 +26,10 @@ class VictoryScreen(val worldScreen: WorldScreen) : PickerScreen() {
private val contentsTable = Table()
init {
val difficultyLabel = ("{Difficulty}: {${worldScreen.gameInfo.difficulty}}").toLabel()
difficultyLabel.setPosition(10f, stage.height-10, Align.topLeft)
stage.addActor(difficultyLabel)
val tabsTable = Table().apply { defaults().pad(10f) }
val setMyVictoryButton = "Our status".toTextButton().onClick { setMyVictoryTable() }
tabsTable.add(setMyVictoryButton)