diff --git a/core/src/com/unciv/logic/civilization/TechManager.kt b/core/src/com/unciv/logic/civilization/TechManager.kt index f91d51bc2b..f80995729e 100644 --- a/core/src/com/unciv/logic/civilization/TechManager.kt +++ b/core/src/com/unciv/logic/civilization/TechManager.kt @@ -8,6 +8,7 @@ import com.unciv.models.gamebasics.tr import com.unciv.models.gamebasics.unit.BaseUnit import com.unciv.ui.utils.withItem import java.util.* +import kotlin.collections.ArrayList class TechManager { @Transient lateinit var civInfo: CivilizationInfo @@ -173,7 +174,10 @@ class TechManager { techsInProgress.remove(badTechName) } if(techsToResearch.contains(badTechName)){ - techsToResearch.replaceAll { if(it!=badTechName) it else goodTechName } + val newTechToReseach= ArrayList() + for(tech in techsToResearch) + newTechToReseach.add(if(tech!=badTechName) tech else goodTechName) + techsToResearch = newTechToReseach } researchedTechnologies.addAll(techsResearched.map { GameBasics.Technologies[it]!! })