mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 06:16:37 -04:00
Resolved #1157 - Added popup for entering Golden Age
This commit is contained in:
parent
4cde23e7a9
commit
69dd7ec7b6
@ -33,6 +33,7 @@ class GoldenAgeManager{
|
|||||||
turnsToGoldenAge *= civInfo.gameInfo.gameParameters.gameSpeed.getModifier()
|
turnsToGoldenAge *= civInfo.gameInfo.gameParameters.gameSpeed.getModifier()
|
||||||
turnsLeftForCurrentGoldenAge += turnsToGoldenAge.toInt()
|
turnsLeftForCurrentGoldenAge += turnsToGoldenAge.toInt()
|
||||||
civInfo.addNotification("You have entered a golden age!", null, Color.GOLD)
|
civInfo.addNotification("You have entered a golden age!", null, Color.GOLD)
|
||||||
|
civInfo.popupAlerts.add(PopupAlert(AlertType.GoldenAge,""))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun endTurn(happiness: Int) {
|
fun endTurn(happiness: Int) {
|
||||||
|
@ -12,6 +12,7 @@ enum class AlertType{
|
|||||||
CitiesSettledNearOtherCiv,
|
CitiesSettledNearOtherCiv,
|
||||||
DemandToStopSettlingCitiesNear,
|
DemandToStopSettlingCitiesNear,
|
||||||
CitySettledNearOtherCivDespiteOurPromise,
|
CitySettledNearOtherCivDespiteOurPromise,
|
||||||
|
GoldenAge,
|
||||||
}
|
}
|
||||||
|
|
||||||
class PopupAlert {
|
class PopupAlert {
|
||||||
|
@ -139,6 +139,12 @@ class AlertPopup(val worldScreen: WorldScreen, val popupAlert: PopupAlert): Popu
|
|||||||
add(centerTable).row()
|
add(centerTable).row()
|
||||||
add(getCloseButton("Close"))
|
add(getCloseButton("Close"))
|
||||||
}
|
}
|
||||||
|
AlertType.GoldenAge -> {
|
||||||
|
addGoodSizedLabel("GOLDEN AGE")
|
||||||
|
addSeparator()
|
||||||
|
addGoodSizedLabel("Your citizens have been happy with your rule for so long that the empire enters a Golden Age!").row()
|
||||||
|
add(getCloseButton("Close"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
open()
|
open()
|
||||||
worldScreen.alertPopupIsOpen = true
|
worldScreen.alertPopupIsOpen = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user