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

@ -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()
}