@@ -22,6 +22,7 @@ import com.unciv.ui.components.extensions.surroundWithCircle
22
22
import com.unciv.ui.components.extensions.toLabel
23
23
import com.unciv.ui.components.fonts.Fonts
24
24
import com.unciv.ui.components.input.onClick
25
+ import com.unciv.ui.components.input.onRightClick
25
26
import com.unciv.ui.components.input.onDoubleClick
26
27
import com.unciv.ui.images.ImageGetter
27
28
import com.unciv.ui.popups.ToastPopup
@@ -95,7 +96,7 @@ class TechPickerScreen(
95
96
if (tech != null ) {
96
97
// select only if there it doesn't mess up tempTechsToResearch
97
98
if (civInfo.tech.isResearched(tech.name) || civInfo.tech.techsToResearch.size <= 1 )
98
- selectTechnology(tech, true )
99
+ selectTechnology(tech, queue = false , center = true )
99
100
else centerOnTechnology(tech)
100
101
} else {
101
102
// center on any possible technology which is ready for the research right now
@@ -191,7 +192,8 @@ class TechPickerScreen(
191
192
val techButton = TechButton (tech.name, civTech, false )
192
193
table.add(techButton)
193
194
techNameToButton[tech.name] = techButton
194
- techButton.onClick { selectTechnology(tech, false ) }
195
+ techButton.onClick { selectTechnology(tech, queue = false , center = false ) }
196
+ techButton.onRightClick { selectTechnology(tech, queue = true , center = false ) }
195
197
techButton.onDoubleClick(UncivSound .Paper ) { tryExit() }
196
198
techTable.add(table).fillX()
197
199
}
@@ -364,7 +366,7 @@ class TechPickerScreen(
364
366
orderIndicators.toFront()
365
367
}
366
368
367
- private fun selectTechnology (tech : Technology ? , center : Boolean = false, switchFromWorldScreen : Boolean = true) {
369
+ private fun selectTechnology (tech : Technology ? , queue : Boolean = false, center : Boolean = false, switchFromWorldScreen : Boolean = true) {
368
370
369
371
val previousSelectedTech = selectedTech
370
372
selectedTech = tech
@@ -412,8 +414,16 @@ class TechPickerScreen(
412
414
}
413
415
}
414
416
415
- tempTechsToResearch.clear()
416
- tempTechsToResearch.addAll(pathToTech.map { it.name })
417
+ if (queue){
418
+ for (pathTech in pathToTech) {
419
+ if (pathTech.name !in tempTechsToResearch) {
420
+ tempTechsToResearch.add(pathTech.name)
421
+ }
422
+ }
423
+ }else {
424
+ tempTechsToResearch.clear()
425
+ tempTechsToResearch.addAll(pathToTech.map { it.name })
426
+ }
417
427
418
428
val label = " Research [${tempTechsToResearch[0 ]} ]" .tr()
419
429
val techProgression = getTechProgressLabel(tempTechsToResearch)
0 commit comments