Apparently .replaceAll is incompatible with Android 5.1, but hey who needs them.

This commit is contained in:
Yair Morgenstern 2019-03-24 20:27:00 +02:00
parent bba6f43943
commit e43c22a74b
3 changed files with 6 additions and 3 deletions

View file

@ -21,8 +21,8 @@ android {
applicationId "com.unciv.app"
minSdkVersion 14
targetSdkVersion 28
versionCode 219
versionName "2.14.1"
versionCode 220
versionName "2.14.1.patch1"
}
// Had to add this crap for Travis to build, it wanted to sign the app

View file

@ -143,7 +143,10 @@ class GameInfo {
// As of 2.14.1, changed Machu Pichu to Machu Picchu
val oldMachuName = "Machu Pichu"
val newMachuName = "Machu Picchu"
cityConstructions.builtBuildings.replaceAll { if (it == oldMachuName) newMachuName else it }
if(cityConstructions.builtBuildings.contains(oldMachuName)){
cityConstructions.builtBuildings.remove(oldMachuName)
cityConstructions.builtBuildings.add(newMachuName)
}
if (cityConstructions.currentConstruction == oldMachuName)
cityConstructions.currentConstruction = newMachuName
if (cityConstructions.inProgressConstructions.containsKey(oldMachuName)) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 KiB

After

Width:  |  Height:  |  Size: 390 KiB