Hide crosshair while city can't attack (#2124)

This commit is contained in:
Jack Rainy 2020-03-12 08:33:03 +02:00 committed by GitHub
parent 97a9a0f08c
commit e370bbc53b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -291,6 +291,8 @@ class WorldMapHolder(internal val worldScreen: WorldScreen, internal val tileMap
}
private fun updateTilegroupsForSelectedCity(city: CityInfo, playerViewableTilePositions: HashSet<Vector2>) {
if (city.attackedThisTurn) return
val attackableTiles = UnitAutomation().getBombardTargets(city)
.filter { (UncivGame.Current.viewEntireMapForDebug || playerViewableTilePositions.contains(it.position)) }
for (attackableTile in attackableTiles) {