chore: code linting

This commit is contained in:
yairm210 2024-12-05 21:18:10 +02:00
parent 2dfeb4a142
commit 66b6be5858

View File

@ -45,9 +45,7 @@ class TileLayerCityButton(tileGroup: TileGroup, size: Float) : TileLayer(tileGro
}
override fun doUpdate(viewingCiv: Civilization?, localUniqueCache: LocalUniqueCache) {
if (tileGroup !is WorldTileGroup)
return
if (tileGroup !is WorldTileGroup) return
val city = tile().getCity()
@ -57,21 +55,16 @@ class TileLayerCityButton(tileGroup: TileGroup, size: Float) : TileLayer(tileGro
cityButton = null
}
if (viewingCiv == null)
return
val tileIsViewable = isViewable(viewingCiv)
val shouldShow = DebugUtils.VISIBLE_MAP
if (viewingCiv == null) return
if (city == null || !tileGroup.tile.isCityCenter()) return
// Create (if not yet) and update city button
if (city != null && tileGroup.tile.isCityCenter()) {
if (cityButton == null) {
cityButton = CityButton(city, tileGroup)
addActor(cityButton)
}
cityButton!!.update(shouldShow || tileIsViewable)
if (cityButton == null) {
cityButton = CityButton(city, tileGroup)
addActor(cityButton)
}
cityButton!!.update(DebugUtils.VISIBLE_MAP || isViewable(viewingCiv))
}
}