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.utils.Align
import com.unciv.UncivGame
import com.unciv.logic.map.HexMath
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.Tile
import com.unciv.models.helpers.MapArrowType
@ -667,7 +667,10 @@ open class TileGroup(
currentImage?.remove()
return null
} 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.
val newImage = ImageGetter.getImage(imageName)
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
if (unit.civInfo.isOneCityChallenger() && unit.civInfo.hasEverOwnedOriginalCapital == true) return null
if (unit.currentMovement <= 0 ||
!tile.canBeSettled())
if (unit.currentMovement <= 0 || !tile.canBeSettled())
return UnitAction(UnitActionType.FoundCity, action = null)
val foundAction = {

View File

@ -1528,11 +1528,6 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl
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 [3] damage"