Resolved #8435 - rivers remain visible after founding city

This commit is contained in:
Yair Morgenstern 2023-01-22 19:33:27 +02:00
parent 2a3e707f24
commit 2e5d1bf591
3 changed files with 6 additions and 9 deletions

View File

@ -9,8 +9,8 @@ import com.badlogic.gdx.scenes.scene2d.Touchable
import com.badlogic.gdx.scenes.scene2d.ui.Image import com.badlogic.gdx.scenes.scene2d.ui.Image
import com.badlogic.gdx.utils.Align import com.badlogic.gdx.utils.Align
import com.unciv.UncivGame import com.unciv.UncivGame
import com.unciv.logic.map.HexMath
import com.unciv.logic.civilization.Civilization import com.unciv.logic.civilization.Civilization
import com.unciv.logic.map.HexMath
import com.unciv.logic.map.tile.RoadStatus import com.unciv.logic.map.tile.RoadStatus
import com.unciv.logic.map.tile.Tile import com.unciv.logic.map.tile.Tile
import com.unciv.models.helpers.MapArrowType import com.unciv.models.helpers.MapArrowType
@ -667,7 +667,10 @@ open class TileGroup(
currentImage?.remove() currentImage?.remove()
return null return null
} else { } else {
if (currentImage != null) return currentImage if (currentImage != null) {
currentImage.toFront() // So when e.g. founding cities the other tile images don't hide the river
return currentImage
}
if (!ImageGetter.imageExists(imageName)) return null // Old "Default" tileset gets no rivers. if (!ImageGetter.imageExists(imageName)) return null // Old "Default" tileset gets no rivers.
val newImage = ImageGetter.getImage(imageName) val newImage = ImageGetter.getImage(imageName)
baseLayerGroup.addActor(newImage) baseLayerGroup.addActor(newImage)

View File

@ -184,8 +184,7 @@ object UnitActions {
// Spain should still be able to build Conquistadors in a one city challenge - but can't settle them // Spain should still be able to build Conquistadors in a one city challenge - but can't settle them
if (unit.civInfo.isOneCityChallenger() && unit.civInfo.hasEverOwnedOriginalCapital == true) return null if (unit.civInfo.isOneCityChallenger() && unit.civInfo.hasEverOwnedOriginalCapital == true) return null
if (unit.currentMovement <= 0 || if (unit.currentMovement <= 0 || !tile.canBeSettled())
!tile.canBeSettled())
return UnitAction(UnitActionType.FoundCity, action = null) return UnitAction(UnitActionType.FoundCity, action = null)
val foundAction = { val foundAction = {

View File

@ -1528,11 +1528,6 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
Applicable to: Improvement Applicable to: Improvement
??? example "Costs [amount] gold per turn when in your territory"
Example: "Costs [3] gold per turn when in your territory"
Applicable to: Improvement
??? example "Adjacent enemy units ending their turn take [amount] damage" ??? example "Adjacent enemy units ending their turn take [amount] damage"
Example: "Adjacent enemy units ending their turn take [3] damage" Example: "Adjacent enemy units ending their turn take [3] damage"