mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-18 11:49:19 +07:00
Added tutorials when first encountering barbarians and other civilizations
This commit is contained in:
@ -242,6 +242,22 @@
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
BarbarianEncountered: [
|
||||||
|
[
|
||||||
|
"You have encountered a barbarian unit!",
|
||||||
|
"Barbarians attack everyone indiscriminately, so don't let your ",
|
||||||
|
" civilian units go near them, and be careful of your scout!"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
OtherCivEncountered: [
|
||||||
|
[
|
||||||
|
"You have encountered another civilization!",
|
||||||
|
"Other civilizations start out peaceful, and you can trade with them,",
|
||||||
|
" but they may choose to declare war on you later on"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -124,6 +124,7 @@ class WorldScreen : CameraStageBaseScreen() {
|
|||||||
if(civInfo.diplomacy.values.map { it.otherCiv() }
|
if(civInfo.diplomacy.values.map { it.otherCiv() }
|
||||||
.filterNot { it.isDefeated() || it.isPlayerCivilization() || it.isBarbarianCivilization() }
|
.filterNot { it.isDefeated() || it.isPlayerCivilization() || it.isBarbarianCivilization() }
|
||||||
.any()) {
|
.any()) {
|
||||||
|
displayTutorials("OtherCivEncountered")
|
||||||
val btn = TextButton("Diplomacy".tr(), skin)
|
val btn = TextButton("Diplomacy".tr(), skin)
|
||||||
btn.addClickListener { UnCivGame.Current.screen = DiplomacyScreen() }
|
btn.addClickListener { UnCivGame.Current.screen = DiplomacyScreen() }
|
||||||
diplomacyButtonWrapper.add(btn)
|
diplomacyButtonWrapper.add(btn)
|
||||||
@ -201,7 +202,11 @@ class WorldScreen : CameraStageBaseScreen() {
|
|||||||
// otherwise images will not load properly!
|
// otherwise images will not load properly!
|
||||||
update()
|
update()
|
||||||
|
|
||||||
|
|
||||||
displayTutorials("NextTurn")
|
displayTutorials("NextTurn")
|
||||||
|
if("BarbarianEncountered" !in UnCivGame.Current.settings.tutorialsShown
|
||||||
|
&& civInfo.getViewableTiles().any { it.getUnits().any { unit -> unit.civInfo.isBarbarianCivilization() } })
|
||||||
|
displayTutorials("BarbarianEncountered")
|
||||||
if(civInfo.cities.size > 2) displayTutorials("SecondCity")
|
if(civInfo.cities.size > 2) displayTutorials("SecondCity")
|
||||||
if(civInfo.happiness<0) displayTutorials("Unhappiness")
|
if(civInfo.happiness<0) displayTutorials("Unhappiness")
|
||||||
if(civInfo.goldenAges.isGoldenAge()) displayTutorials("GoldenAge")
|
if(civInfo.goldenAges.isGoldenAge()) displayTutorials("GoldenAge")
|
||||||
|
Reference in New Issue
Block a user