mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-24 18:06:04 +07:00
3.8.12-patch1
Added case where worker that needs to ru away has nowhere to move to
This commit is contained in:
parent
1f7d9ead20
commit
8e9cd174dc
@ -3,8 +3,8 @@ package com.unciv.build
|
||||
object BuildConfig {
|
||||
const val kotlinVersion = "1.3.71"
|
||||
const val appName = "Unciv"
|
||||
const val appCodeNumber = 431
|
||||
const val appVersion = "3.8.12"
|
||||
const val appCodeNumber = 432
|
||||
const val appVersion = "3.8.12-patch1"
|
||||
|
||||
const val gdxVersion = "1.9.10"
|
||||
const val roboVMVersion = "2.3.1"
|
||||
|
@ -77,7 +77,8 @@ class WorkerAutomation(val unit: MapUnit) {
|
||||
return
|
||||
}
|
||||
val tileFurthestFromEnemy = reachableTiles.keys.filter { unit.movement.canMoveTo(it) }
|
||||
.maxBy(this::countDistanceToClosestEnemy)!!
|
||||
.maxBy(this::countDistanceToClosestEnemy)
|
||||
if(tileFurthestFromEnemy==null) return // can't move anywhere!
|
||||
unit.movement.moveToTile(tileFurthestFromEnemy)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user