mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 22:37:02 -04:00
Fixed Wait action when auto unit cycle is disabled
This commit is contained in:
parent
66ed5ee5ef
commit
ba94a6a482
@ -5,7 +5,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table
|
|||||||
import com.unciv.Constants
|
import com.unciv.Constants
|
||||||
import com.unciv.logic.GameInfoPreview
|
import com.unciv.logic.GameInfoPreview
|
||||||
import com.unciv.logic.map.MapGeneratedMainType
|
import com.unciv.logic.map.MapGeneratedMainType
|
||||||
import com.unciv.logic.map.MapParameters
|
|
||||||
import com.unciv.models.ruleset.Ruleset
|
import com.unciv.models.ruleset.Ruleset
|
||||||
import com.unciv.ui.components.extensions.toLabel
|
import com.unciv.ui.components.extensions.toLabel
|
||||||
import com.unciv.ui.components.input.onChange
|
import com.unciv.ui.components.input.onChange
|
||||||
@ -13,7 +12,7 @@ import com.unciv.ui.components.widgets.TranslatedSelectBox
|
|||||||
import com.unciv.ui.screens.basescreen.BaseScreen
|
import com.unciv.ui.screens.basescreen.BaseScreen
|
||||||
import com.unciv.utils.Concurrency
|
import com.unciv.utils.Concurrency
|
||||||
|
|
||||||
class ScenarioSelectTable(val newGameScreen: NewGameScreen, mapParameters: MapParameters) : Table() {
|
class ScenarioSelectTable(val newGameScreen: NewGameScreen) : Table() {
|
||||||
|
|
||||||
data class ScenarioData(val name:String, val file: FileHandle){
|
data class ScenarioData(val name:String, val file: FileHandle){
|
||||||
var preview: GameInfoPreview? = null
|
var preview: GameInfoPreview? = null
|
||||||
@ -71,7 +70,7 @@ class MapOptionsTable(private val newGameScreen: NewGameScreen) : Table() {
|
|||||||
internal val generatedMapOptionsTable = MapParametersTable(newGameScreen, mapParameters, MapGeneratedMainType.generated)
|
internal val generatedMapOptionsTable = MapParametersTable(newGameScreen, mapParameters, MapGeneratedMainType.generated)
|
||||||
private val randomMapOptionsTable = MapParametersTable(newGameScreen, mapParameters, MapGeneratedMainType.randomGenerated)
|
private val randomMapOptionsTable = MapParametersTable(newGameScreen, mapParameters, MapGeneratedMainType.randomGenerated)
|
||||||
private val savedMapOptionsTable = MapFileSelectTable(newGameScreen, mapParameters)
|
private val savedMapOptionsTable = MapFileSelectTable(newGameScreen, mapParameters)
|
||||||
private val scenarioOptionsTable = ScenarioSelectTable(newGameScreen, mapParameters)
|
private val scenarioOptionsTable = ScenarioSelectTable(newGameScreen)
|
||||||
internal val mapTypeSelectBox: TranslatedSelectBox
|
internal val mapTypeSelectBox: TranslatedSelectBox
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
@ -382,7 +382,11 @@ object UnitActions {
|
|||||||
type = UnitActionType.Wait,
|
type = UnitActionType.Wait,
|
||||||
useFrequency = 65f, // Preferably have this on the first page
|
useFrequency = 65f, // Preferably have this on the first page
|
||||||
action = {
|
action = {
|
||||||
unit.due = false // Skips to next unit due to worldScreen.switchToNextUnit() in activateAction
|
// If it's on, skips to next unit due to worldScreen.switchToNextUnit() in activateAction
|
||||||
|
// We don't want to switch twice since then we skip units :)
|
||||||
|
if (!UncivGame.Current.settings.autoUnitCycle)
|
||||||
|
GUI.getWorldScreen().switchToNextUnit()
|
||||||
|
unit.due = false
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user