mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-24 13:41:08 +07:00
Resolved #11956 - Fixed Workboat construction automation ignoring existing workboat in city
This commit is contained in:
parent
6a8718746d
commit
4cedc38668
@ -203,7 +203,7 @@ class ConstructionAutomation(val cityConstructions: CityConstructions) {
|
||||
// todo Still ignores whether that boat can reach the not-yet-found tile to improve
|
||||
val twoTurnsMovement = buildableWorkboatUnits.maxOf { it.movement } * 2
|
||||
fun MapUnit.isOurWorkBoat() = cache.hasUniqueToCreateWaterImprovements && this.civ == this@ConstructionAutomation.civInfo
|
||||
val alreadyHasWorkBoat = city.getCenterTile().getTilesInDistanceRange(1..twoTurnsMovement)
|
||||
val alreadyHasWorkBoat = city.getCenterTile().getTilesInDistance(twoTurnsMovement)
|
||||
.any { it.civilianUnit?.isOurWorkBoat() == true }
|
||||
if (alreadyHasWorkBoat) return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user