mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Automated workers now build unique improvements
This commit is contained in:
parent
20a7ff7c76
commit
3d18a2aa0a
@ -182,14 +182,21 @@ class WorkerAutomation(val unit: MapUnit) {
|
|||||||
else -> tile.getTileResource().improvement
|
else -> tile.getTileResource().improvement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val uniqueImprovement = civInfo.gameInfo.ruleSet.tileImprovements.values
|
||||||
|
.firstOrNull { it.uniqueTo==civInfo.civName}
|
||||||
|
|
||||||
val improvementString = when {
|
val improvementString = when {
|
||||||
tile.improvementInProgress != null -> tile.improvementInProgress
|
tile.improvementInProgress != null -> tile.improvementInProgress
|
||||||
improvementStringForResource != null -> improvementStringForResource
|
improvementStringForResource != null -> improvementStringForResource
|
||||||
tile.containsGreatImprovement() -> null
|
tile.containsGreatImprovement() -> null
|
||||||
tile.containsUnfinishedGreatImprovement() -> null
|
tile.containsUnfinishedGreatImprovement() -> null
|
||||||
tile.terrainFeature == Constants.jungle -> "Trading post"
|
|
||||||
tile.terrainFeature == "Marsh" -> "Remove Marsh"
|
// I think we can assume that the unique improvement is better
|
||||||
|
uniqueImprovement!=null && tile.canBuildImprovement(uniqueImprovement,civInfo) -> uniqueImprovement.name
|
||||||
|
|
||||||
tile.terrainFeature == "Fallout" -> "Remove Fallout"
|
tile.terrainFeature == "Fallout" -> "Remove Fallout"
|
||||||
|
tile.terrainFeature == "Marsh" -> "Remove Marsh"
|
||||||
|
tile.terrainFeature == Constants.jungle -> "Trading post"
|
||||||
tile.terrainFeature == "Oasis" -> null
|
tile.terrainFeature == "Oasis" -> null
|
||||||
tile.terrainFeature == Constants.forest -> "Lumber mill"
|
tile.terrainFeature == Constants.forest -> "Lumber mill"
|
||||||
tile.baseTerrain == Constants.hill -> "Mine"
|
tile.baseTerrain == Constants.hill -> "Mine"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user