mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 22:37:02 -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.models.gamebasics.unit.BaseUnit
|
||||||
import com.unciv.ui.utils.withItem
|
import com.unciv.ui.utils.withItem
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
import kotlin.collections.ArrayList
|
||||||
|
|
||||||
class TechManager {
|
class TechManager {
|
||||||
@Transient lateinit var civInfo: CivilizationInfo
|
@Transient lateinit var civInfo: CivilizationInfo
|
||||||
@ -173,7 +174,10 @@ class TechManager {
|
|||||||
techsInProgress.remove(badTechName)
|
techsInProgress.remove(badTechName)
|
||||||
}
|
}
|
||||||
if(techsToResearch.contains(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]!! })
|
researchedTechnologies.addAll(techsResearched.map { GameBasics.Technologies[it]!! })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user