If a unit can be promoted twice, the promotion picker remains open after you pick the first promotion

This commit is contained in:
Yair Morgenstern 2018-07-18 13:26:29 +03:00
parent 23a9886de7
commit 5ee0c47e22
2 changed files with 4 additions and 3 deletions

View File

@ -21,8 +21,8 @@ android {
applicationId "com.unciv.game"
minSdkVersion 14
targetSdkVersion 26
versionCode 102
versionName "2.6.4"
versionCode 103
versionName "2.6.5"
}
buildTypes {
release {

View File

@ -17,7 +17,8 @@ class PromotionPickerScreen(mapUnit: MapUnit) : PickerScreen() {
rightSideButton.setText("Pick promotion")
rightSideButton.addClickListener {
mapUnit.promotions.addPromotion(selectedPromotion!!.name)
game.setWorldScreen()
if(mapUnit.promotions.canBePromoted()) game.screen = PromotionPickerScreen(mapUnit)
else game.setWorldScreen()
dispose()
}