mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 05:46:43 -04:00
Fixing workers not repairing tiles with Great improvement when pillaged (#12382)
* Settler settle best tile when not escort and dangerous Tiles instead of running away Settler unit will now settle on best tile in dangerous Tiles without escort instead of running away. * Update WorkerAutomation.kt * Update SpecificUnitAutomation.kt * Update WorkerAutomation.kt * Update SpecificUnitAutomation.kt
This commit is contained in:
parent
0e7b9db766
commit
d652294ea9
@ -190,7 +190,6 @@ object SpecificUnitAutomation {
|
||||
throw Exception("City within distance")
|
||||
return
|
||||
}
|
||||
|
||||
unit.movement.headTowards(bestCityLocation)
|
||||
if (unit.getTile() == bestCityLocation && unit.hasMovement())
|
||||
foundCityAction.action.invoke()
|
||||
|
@ -232,7 +232,7 @@ class WorkerAutomation(
|
||||
if (!tile.hasViewableResource(civInfo) && tile.getTilesInDistance(civInfo.gameInfo.ruleset.modOptions.constants.cityWorkRange)
|
||||
.none { it.isCityCenter() && it.getCity()?.civ == civInfo }
|
||||
) return false
|
||||
if (tile.getTileImprovement()?.hasUnique(UniqueType.AutomatedUnitsWillNotReplace) == true) return false
|
||||
if (tile.getTileImprovement()?.hasUnique(UniqueType.AutomatedUnitsWillNotReplace) == true && !tile.isPillaged()) return false
|
||||
return true
|
||||
}
|
||||
|
||||
@ -270,8 +270,6 @@ class WorkerAutomation(
|
||||
tileRankings[tile] = TileImprovementRank(priority)
|
||||
return priority + unitSpecificPriority
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calculates the priority building the improvement on the tile
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user