Resolved #1229 - AI doesn't choose to construct workers if the Civ has idle automated workers
This commit is contained in:
parent
7d1fd6e177
commit
6fb3ba0f13
1 changed files with 2 additions and 0 deletions
|
@ -112,6 +112,8 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
|
|||
}
|
||||
|
||||
private fun addWorkerChoice() {
|
||||
if(civInfo.getIdleUnits().any { it.name==Constants.worker && it.action== Constants.unitActionAutomation})
|
||||
return // If we have automated workers who have no work to do then it's silly to construct new workers.
|
||||
val citiesCountedTowardsWorkers = min(5, cities) // above 5 cities, extra cities won't make us want more workers
|
||||
if (workers < citiesCountedTowardsWorkers * 0.6f && civUnits.none { it.name==Constants.worker && it.isIdle() }) {
|
||||
var modifier = citiesCountedTowardsWorkers / (workers + 0.1f)
|
||||
|
|
Loading…
Reference in a new issue