Fix next-turn not offering Policy Picker for free Policies (#9963)

This commit is contained in:
SomeTroglodyte 2023-08-24 09:09:09 +02:00 committed by GitHub
parent cfd22621ee
commit 88449a819b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,8 @@ enum class NextTurnAction(protected val text: String, val color: Color) {
},
PickPolicy("Pick a policy", Color.VIOLET) {
override fun isChoice(worldScreen: WorldScreen) =
worldScreen.viewingCiv.policies.shouldOpenPolicyPicker
worldScreen.viewingCiv.policies.shouldOpenPolicyPicker ||
worldScreen.viewingCiv.policies.freePolicies > 0 && worldScreen.viewingCiv.policies.canAdoptPolicy()
override fun action(worldScreen: WorldScreen) {
worldScreen.game.pushScreen(PolicyPickerScreen(worldScreen.selectedCiv, worldScreen.canChangeState))
worldScreen.viewingCiv.policies.shouldOpenPolicyPicker = false