mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
A minor usage of Java 8 replaced with non-Java-8 for older phones
This commit is contained in:
parent
55860fb480
commit
24d71c3450
@ -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<String>()
|
||||
for(tech in techsToResearch)
|
||||
newTechToReseach.add(if(tech!=badTechName) tech else goodTechName)
|
||||
techsToResearch = newTechToReseach
|
||||
}
|
||||
|
||||
researchedTechnologies.addAll(techsResearched.map { GameBasics.Technologies[it]!! })
|
||||
|
Loading…
x
Reference in New Issue
Block a user