diff --git a/android/assets/jsons/translations/French.properties b/android/assets/jsons/translations/French.properties index 6a439bd735..0d25506a99 100644 --- a/android/assets/jsons/translations/French.properties +++ b/android/assets/jsons/translations/French.properties @@ -62,6 +62,7 @@ Research Agreement = Accord de recherche Declare war = Déclarer la guerre Declare war on [civName]? = Déclarer la guerre à [civName] ? [civName] has declared war on us! = [civName] nous a déclaré la guerre ! +Let's begin! = Allons-y! [leaderName] of [nation] = [leaderName] de [nation] You'll pay for this! = Vous allez payer cet affront ! Negotiate Peace = Négocier la paix diff --git a/android/assets/jsons/translations/German.properties b/android/assets/jsons/translations/German.properties index 581d0d4786..2723a0752f 100644 --- a/android/assets/jsons/translations/German.properties +++ b/android/assets/jsons/translations/German.properties @@ -61,6 +61,7 @@ Research Agreement = Forschungsvereinbarung Declare war = Krieg erklären Declare war on [civName]? = [civName] den Krieg erklären? [civName] has declared war on us! = [civName] hat uns den Krieg erklärt! +Let's begin! = Los geht's! [leaderName] of [nation] = [leaderName] von [nation] You'll pay for this! = Dafür werdet Ihr bezahlen! Negotiate Peace = Frieden verhandeln diff --git a/android/assets/jsons/translations/Italian.properties b/android/assets/jsons/translations/Italian.properties index cb6d31d646..c8626d2075 100644 --- a/android/assets/jsons/translations/Italian.properties +++ b/android/assets/jsons/translations/Italian.properties @@ -61,6 +61,7 @@ Research Agreement = Accordo di ricerca Declare war = Dichiara guerra Declare war on [civName]? = Vuoi dichiarare guerra a [civName]? [civName] has declared war on us! = La civiltà [civName] ci ha dichiarato guerra! +Let's begin! = Andiamo! [leaderName] of [nation] = [leaderName] dell'impero [nation] You'll pay for this! = Pagherai caro questo affronto! Negotiate Peace = Negozia una pace diff --git a/android/assets/jsons/translations/Spanish.properties b/android/assets/jsons/translations/Spanish.properties index 14c288807a..ed3b3e8ef1 100644 --- a/android/assets/jsons/translations/Spanish.properties +++ b/android/assets/jsons/translations/Spanish.properties @@ -61,6 +61,7 @@ Research Agreement = Acuerdo de investigación Declare war = Declarar la guerra Declare war on [civName]? = ¿Declarar la guerra a [civName]? [civName] has declared war on us! = ¡[civName] nos ha declarado la guerra! +Let's begin! = Vámonos! [leaderName] of [nation] = [leaderName] de [nation] You'll pay for this! = ¡Pagarás por esto! Negotiate Peace = Negociar la paz diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 544e3b8d75..e40188ef5d 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -60,6 +60,7 @@ Peace = Research Agreement = Declare war = Declare war on [civName]? = +Let's begin! = [civName] has declared war on us! = [leaderName] of [nation] = You'll pay for this! = diff --git a/core/src/com/unciv/logic/GameStarter.kt b/core/src/com/unciv/logic/GameStarter.kt index e95552bdda..5e22c553e7 100644 --- a/core/src/com/unciv/logic/GameStarter.kt +++ b/core/src/com/unciv/logic/GameStarter.kt @@ -2,8 +2,7 @@ package com.unciv.logic import com.badlogic.gdx.math.Vector2 import com.unciv.Constants -import com.unciv.logic.civilization.CityStatePersonality -import com.unciv.logic.civilization.CivilizationInfo +import com.unciv.logic.civilization.* import com.unciv.logic.map.BFS import com.unciv.logic.map.TileInfo import com.unciv.logic.map.TileMap @@ -64,10 +63,22 @@ object GameStarter { // set max starting movement for units loaded from map for (unit in tile.getUnits()) unit.currentMovement = unit.getMaxMovement().toFloat() } + + // This triggers the one-time greeting from Nation.startIntroPart1/2 + addPlayerIntros(gameInfo) return gameInfo } + private fun addPlayerIntros(gameInfo: GameInfo) { + gameInfo.civilizations.filter { + // isNotEmpty should also exclude a spectator + it.playerType == PlayerType.Human && it.nation.startIntroPart1.isNotEmpty() + }.forEach { + it.popupAlerts.add(PopupAlert(AlertType.StartIntro, "")) + } + } + private fun addCivTechs(gameInfo: GameInfo, ruleset: Ruleset, gameSetupInfo: GameSetupInfo) { for (civInfo in gameInfo.civilizations.filter { !it.isBarbarian() }) { diff --git a/core/src/com/unciv/logic/civilization/PopupAlert.kt b/core/src/com/unciv/logic/civilization/PopupAlert.kt index 5b00fb0a66..e86ba4ef0b 100644 --- a/core/src/com/unciv/logic/civilization/PopupAlert.kt +++ b/core/src/com/unciv/logic/civilization/PopupAlert.kt @@ -12,6 +12,7 @@ enum class AlertType { CitySettledNearOtherCivDespiteOurPromise, GoldenAge, DeclarationOfFriendship, + StartIntro, } class PopupAlert { diff --git a/core/src/com/unciv/models/ruleset/Nation.kt b/core/src/com/unciv/models/ruleset/Nation.kt index 3ab9decdd2..aed53874fa 100644 --- a/core/src/com/unciv/models/ruleset/Nation.kt +++ b/core/src/com/unciv/models/ruleset/Nation.kt @@ -43,10 +43,11 @@ class Nation : INamed { var innerColor: List? = null var startBias = ArrayList() - /* Properties present in json but not yet implemented: - var adjective = ArrayList() var startIntroPart1 = "" var startIntroPart2 = "" + + /* Properties present in json but not yet implemented: + var adjective = ArrayList() */ @Transient diff --git a/core/src/com/unciv/ui/worldscreen/AlertPopup.kt b/core/src/com/unciv/ui/worldscreen/AlertPopup.kt index 4720f2dd97..5edd9bbcec 100644 --- a/core/src/com/unciv/ui/worldscreen/AlertPopup.kt +++ b/core/src/com/unciv/ui/worldscreen/AlertPopup.kt @@ -221,6 +221,13 @@ class AlertPopup(val worldScreen: WorldScreen, val popupAlert: PopupAlert): Popu playerDiploManager.signDeclarationOfFriendship() }).row() } + AlertType.StartIntro -> { + val civInfo = worldScreen.viewingCiv + addLeaderName(civInfo) + addGoodSizedLabel(civInfo.nation.startIntroPart1).row() + addGoodSizedLabel(civInfo.nation.startIntroPart2).row() + add(getCloseButton("Let's begin!")) + } } }