Merge branch '3.11.1-patch1'

This commit is contained in:
Yair Morgenstern 2020-10-07 14:13:30 +03:00
commit a485ad5fa5
3 changed files with 12 additions and 11 deletions

View File

@ -47,16 +47,16 @@ class AndroidLauncher : AndroidApplication() {
* replaces them with the ones in the external folder!) * replaces them with the ones in the external folder!)
*/ */
private fun copyMods() { private fun copyMods() {
// Mod directory in the internal app data (where Gdx.files.local looks) // Mod directory in the internal app data (where Gdx.files.local looks)
val internalModsDir = File("${filesDir.path}/mods") val internalModsDir = File("${filesDir.path}/mods")
// Mod directory in the shared app data (where the user can see and modify) // Mod directory in the shared app data (where the user can see and modify)
val externalModsDir = File("${getExternalFilesDir(null)?.path}/mods") val externalModsDir = File("${getExternalFilesDir(null)?.path}/mods")
// Copy external mod directory (with data user put in it) to internal (where it can be read) // Copy external mod directory (with data user put in it) to internal (where it can be read)
if (!externalModsDir.exists()) externalModsDir.mkdirs() // this can fail sometimes, which is why we check if it exists again in the next line if (!externalModsDir.exists()) externalModsDir.mkdirs() // this can fail sometimes, which is why we check if it exists again in the next line
if (externalModsDir.exists()) externalModsDir.copyRecursively(internalModsDir) if (externalModsDir.exists()) externalModsDir.copyRecursively(internalModsDir, true)
} }
override fun onPause() { override fun onPause() {
if (UncivGame.Companion.isCurrentInitialized() if (UncivGame.Companion.isCurrentInitialized()

View File

@ -3,8 +3,8 @@ package com.unciv.build
object BuildConfig { object BuildConfig {
const val kotlinVersion = "1.3.71" const val kotlinVersion = "1.3.71"
const val appName = "Unciv" const val appName = "Unciv"
const val appCodeNumber = 481 const val appCodeNumber = 482
const val appVersion = "3.11.1" const val appVersion = "3.11.1-patch1"
const val gdxVersion = "1.9.10" const val gdxVersion = "1.9.10"
const val roboVMVersion = "2.3.1" const val roboVMVersion = "2.3.1"

View File

@ -246,7 +246,8 @@ class CityInfo {
fun getGreatPersonMap():StatMap { fun getGreatPersonMap():StatMap {
val stats = StatMap() val stats = StatMap()
for((specialist, amount) in population.getNewSpecialists()) for((specialist, amount) in population.getNewSpecialists())
stats.add("Specialists", getRuleset().specialists[specialist]!!.greatPersonPoints.times(amount)) if (getRuleset().specialists.containsKey(specialist)) // To solve problems in total remake mods
stats.add("Specialists", getRuleset().specialists[specialist]!!.greatPersonPoints.times(amount))
val buildingStats = Stats() val buildingStats = Stats()
for (building in cityConstructions.getBuiltBuildings()) for (building in cityConstructions.getBuiltBuildings())