mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 10:54:19 -04: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
|
// todo Still ignores whether that boat can reach the not-yet-found tile to improve
|
||||||
val twoTurnsMovement = buildableWorkboatUnits.maxOf { it.movement } * 2
|
val twoTurnsMovement = buildableWorkboatUnits.maxOf { it.movement } * 2
|
||||||
fun MapUnit.isOurWorkBoat() = cache.hasUniqueToCreateWaterImprovements && this.civ == this@ConstructionAutomation.civInfo
|
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 }
|
.any { it.civilianUnit?.isOurWorkBoat() == true }
|
||||||
if (alreadyHasWorkBoat) return
|
if (alreadyHasWorkBoat) return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user