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

@ -62,8 +62,8 @@ object Constants {
const val tutorialPopupNamePrefix = "Tutorial: " const val tutorialPopupNamePrefix = "Tutorial: "
const val close = "Close" const val close = "Close"
const val disabled="disabled" const val disabled = "disabled"
const val enabled="enabled" const val enabled = "enabled"
const val scienceConversionEffect = "Production to science conversion in cities increased by 33%" const val scienceConversionEffect = "Production to science conversion in cities increased by 33%"

View file

@ -537,8 +537,7 @@ class TileEditorOptionsTable(val mapEditorScreen: MapEditorScreen): Table(Camera
// Allow barbarian camps, ruins and similar without clear // Allow barbarian camps, ruins and similar without clear
-> if (topTerrain.unbuildable && improvement.isGreatImprovement()) -> if (topTerrain.unbuildable && improvement.isGreatImprovement())
tileInfo.terrainFeature = null tileInfo.terrainFeature = null
topTerrain.unbuildable topTerrain.unbuildable -> tileInfo.improvement = null // forbid on unbuildable feature
-> tileInfo.improvement = null // forbid on unbuildable feature
"Can only be built on Coastal tiles" in improvement.uniques && tileInfo.isCoastalTile() "Can only be built on Coastal tiles" in improvement.uniques && tileInfo.isCoastalTile()
-> Unit // allow Moai where appropriate -> Unit // allow Moai where appropriate
else -> tileInfo.improvement = null 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.graphics.Color
import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.ui.Table
import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.badlogic.gdx.scenes.scene2d.ui.TextButton
import com.badlogic.gdx.utils.Align
import com.unciv.logic.civilization.CivilizationInfo import com.unciv.logic.civilization.CivilizationInfo
import com.unciv.models.ruleset.VictoryType import com.unciv.models.ruleset.VictoryType
import com.unciv.models.translations.tr import com.unciv.models.translations.tr
@ -25,6 +26,10 @@ class VictoryScreen(val worldScreen: WorldScreen) : PickerScreen() {
private val contentsTable = Table() private val contentsTable = Table()
init { 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 tabsTable = Table().apply { defaults().pad(10f) }
val setMyVictoryButton = "Our status".toTextButton().onClick { setMyVictoryTable() } val setMyVictoryButton = "Our status".toTextButton().onClick { setMyVictoryTable() }
tabsTable.add(setMyVictoryButton) tabsTable.add(setMyVictoryButton)