Update NextTurnAutomation.kt (#12634)

This commit is contained in:
EmperorPinguin
2024-12-14 17:13:43 +01:00
committed by GitHub
parent 2a0cab7d40
commit 5fa2e7be95

View File

@ -277,7 +277,9 @@ object NextTurnAutomation {
val costs = getGroupedResearchableTechs()
if (costs.isEmpty()) return
val cheapestTechs = costs[0]
val cheapestTechs = costs.firstOrNull{
// Ignore rows where all techs have 0 weight
it.any { it.getWeightForAiDecision(stateForConditionals) > 0 } }?: costs.first()
//Do not consider advanced techs if only one tech left in cheapest group
val techToResearch: Technology =
if (cheapestTechs.size == 1 || costs.size == 1) {