AI: Recognize when no further techs can be researched, even if some techs are blocked (#7755)

This commit is contained in:
Yair Morgenstern 2022-09-08 22:48:58 +03:00 committed by GitHub
parent 11bfe93ce7
commit ab1236683f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,8 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
private val militaryUnits = civUnits.count { it.baseUnit.isMilitary() }
private val workers = civUnits.count { it.hasUniqueToBuildImprovements && it.isCivilian() }.toFloat()
private val cities = civInfo.cities.size
private val allTechsAreResearched = civInfo.tech.getNumberOfTechsResearched() >= civInfo.gameInfo.ruleSet.technologies.size
private val allTechsAreResearched = civInfo.gameInfo.ruleSet.technologies.values
.all { civInfo.tech.isResearched(it.name) || !civInfo.tech.canBeResearched(it.name)}
private val isAtWar = civInfo.isAtWar()
private val buildingsForVictory = civInfo.gameInfo.getEnabledVictories().values