mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 22:34:32 +07:00
Update NextTurnAutomation.kt (#12634)
This commit is contained in:
parent
2a0cab7d40
commit
5fa2e7be95
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user