Display the "Natural Wonders" tutorial (#2371)

* Update Tutorials.json

Added tutorial for Natural Wonders

* Enable displaying the Natural Wonders tutorial

* Display the tutorial when the wonder is found automatically

* Minor performance optimization

* Removing debug leftovers

See also 33da0e3a7f

Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
This commit is contained in:
Jack Rainy 2020-04-11 21:44:34 +03:00 committed by GitHub
parent c866d96707
commit bf823f5883
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

@ -177,4 +177,7 @@
"Instead, diplomatic relations with city-states are determined by Influence - a meter of 'how much the City-state likes you'.\nInfluence can be increased by attacking their enemies, liberating their city, and giving them sums of gold.",
"Certain bonuses are given when you are at above 30 influence.\nWhen you have above 60 Influence, and you have the highest influence with them of all civilizations, you are considered their 'Ally', and gain further bonuses and access to the Luxury and Strategic resources in their lands."
]
Natural_Wonders: [
"Natural Wonders, such as the Mt. Fuji, the Rock of Gibraltar and the Great Barrier Reef, are unique, impassable terrain features, masterpieces of mother Nature, which possess exceptional qualities that make them very different from the average terrain.\nThey benefit by giving you large sums of Culture, Science, Gold or Production if worked by your Cities, which is why you might need to bring them under your empire as soon as possible."
]
}

View file

@ -31,6 +31,7 @@ enum class Tutorial(val value: String, val isCivilopedia: Boolean = !value.start
Combat("Combat"),
ResearchAgreements("Research_Agreements"),
CityStates("City-States"),
NaturalWonders("Natural_Wonders"),
;
companion object {

View file

@ -572,6 +572,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
}
private fun showTutorialsOnNextTurn(){
if (!UncivGame.Current.settings.showTutorials) return
displayTutorial(Tutorial.SlowStart)
displayTutorial(Tutorial.BarbarianEncountered) { viewingCiv.viewableTiles.any { it.getUnits().any { unit -> unit.civInfo.isBarbarian() } } }
displayTutorial(Tutorial.RoadsAndRailroads) { viewingCiv.cities.size > 2 }
@ -581,7 +582,6 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
displayTutorial(Tutorial.IdleUnits) { gameInfo.turns >= 50 && UncivGame.Current.settings.checkForDueUnits }
displayTutorial(Tutorial.ContactMe) { gameInfo.turns >= 100 }
val resources = viewingCiv.detailedCivResources.asSequence().filter { it.origin == "All" } // Avoid full list copy
val test = viewingCiv.getCivResources()
displayTutorial(Tutorial.LuxuryResource) { resources.any { it.resource.resourceType==ResourceType.Luxury } }
displayTutorial(Tutorial.StrategicResource) { resources.any { it.resource.resourceType==ResourceType.Strategic} }
displayTutorial(Tutorial.EnemyCity) {
@ -591,6 +591,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
displayTutorial(Tutorial.ApolloProgram) { viewingCiv.containsBuildingUnique("Enables construction of Spaceship parts") }
displayTutorial(Tutorial.SiegeUnits) { viewingCiv.getCivUnits().any { it.type == UnitType.Siege } }
displayTutorial(Tutorial.Embarking) { viewingCiv.tech.getTechUniques().contains("Enables embarkation for land units") }
displayTutorial(Tutorial.NaturalWonders) { viewingCiv.naturalWonders.size > 0 }
}
private fun backButtonAndESCHandler() {