Tutorial fix

This commit is contained in:
Yair Morgenstern
2019-10-10 09:48:05 +03:00
parent 4baa7b6105
commit 222e4ad4b5
2 changed files with 10 additions and 4 deletions

View File

@ -21,8 +21,8 @@ android {
applicationId "com.unciv.app"
minSdkVersion 14
targetSdkVersion 29
versionCode 305
versionName "3.1.3"
versionCode 306
versionName "3.1.4"
}
// Had to add this crap for Travis to build, it wanted to sign the app

View File

@ -28,8 +28,14 @@ class Tutorials{
fun displayTutorials(name: String, stage: Stage) {
if (!UnCivGame.Current.settings.showTutorials) return
if (UnCivGame.Current.settings.tutorialsShown.contains(name)) return
val texts = getTutorials(name, UnCivGame.Current.settings.language)
tutorialTexts.add(Tutorial(name,texts))
var texts: ArrayList<String>
try {
texts = getTutorials(name, UnCivGame.Current.settings.language)
} catch (ex: Exception) {
texts = ArrayList<String>().apply { add("Could not find matching tutorial!") }
}
tutorialTexts.add(Tutorial(name, texts))
if (!isTutorialShowing) displayTutorial(stage)
}