Select next idle unit only selects units belonging to the player
This commit is contained in:
parent
3ca20951e5
commit
a72c1c7d95
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ import com.unciv.ui.worldscreen.WorldScreen
|
|||
class IdleUnitButton internal constructor(internal val worldScreen: WorldScreen) : TextButton("Select next idle unit", CameraStageBaseScreen.skin) {
|
||||
init {
|
||||
addClickListener {
|
||||
val tilesWithIdleUnits = worldScreen.civInfo.gameInfo.tileMap.values.filter { it.hasIdleUnit() }
|
||||
val tilesWithIdleUnits = worldScreen.civInfo.gameInfo.tileMap.values.filter { it.hasIdleUnit() && it.unit!!.owner == worldScreen.civInfo.civName }
|
||||
|
||||
val tileToSelect: TileInfo
|
||||
if (!tilesWithIdleUnits.contains(worldScreen.tileMapHolder.selectedTile))
|
||||
|
|
Loading…
Reference in a new issue