mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-24 10:01:39 +07:00
Resolved #11400 - unclear settler edge case
This commit is contained in:
parent
5263140911
commit
027e56d6a7
@ -133,7 +133,7 @@ object SpecificUnitAutomation {
|
||||
|
||||
// If the tile we are currently on is close to the best tile, then lets just settle here instead
|
||||
if (bestTilesInfo.tileRankMap.containsKey(unit.getTile())
|
||||
&& (bestTilesInfo.bestTile == null || bestTilesInfo.tileRankMap[unit.getTile()]!! >= bestTilesInfo.tileRankMap[bestTilesInfo.bestTile]!! - 10)) {
|
||||
&& (bestTilesInfo.bestTile == null || bestTilesInfo.tileRankMap[unit.getTile()]!! >= bestTilesInfo.bestTileRank - 10)) {
|
||||
bestCityLocation = unit.getTile()
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ object SpecificUnitAutomation {
|
||||
}
|
||||
|
||||
bestCityLocation = bestTilesInfo.tileRankMap.entries.asSequence()
|
||||
.filter { bestTilesInfo.bestTile == null || it.value >= bestTilesInfo.tileRankMap[bestTilesInfo.bestTile]!! - 5 }
|
||||
.filter { bestTilesInfo.bestTile == null || it.value >= bestTilesInfo.bestTileRank - 5 }
|
||||
.sortedByDescending { it.value }
|
||||
.firstOrNull(::isTileRankOK)
|
||||
?.key
|
||||
|
Loading…
Reference in New Issue
Block a user