mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 21:35:14 -04:00
Remove unnecessary try catch block. (#2869)
This commit is contained in:
parent
aa2f9726ac
commit
1c613ac274
@ -3,6 +3,7 @@ package com.unciv.logic
|
||||
import com.badlogic.gdx.Gdx
|
||||
import com.badlogic.gdx.files.FileHandle
|
||||
import com.badlogic.gdx.utils.Json
|
||||
import com.unciv.UncivGame
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.models.metadata.GameSettings
|
||||
import com.unciv.ui.utils.ImageGetter
|
||||
@ -57,11 +58,8 @@ object GameSaver {
|
||||
}
|
||||
|
||||
fun getGeneralSettingsFile(): FileHandle {
|
||||
try {
|
||||
return Gdx.files.local(settingsFileName)
|
||||
} catch (ex: NullPointerException) {
|
||||
return FileHandle(settingsFileName)
|
||||
}
|
||||
return if (UncivGame.Current.consoleMode) FileHandle(settingsFileName)
|
||||
else Gdx.files.local(settingsFileName)
|
||||
}
|
||||
|
||||
fun getGeneralSettings(): GameSettings {
|
||||
|
@ -35,7 +35,10 @@ internal object ConsoleLauncher {
|
||||
val game = UncivGame(consoleParameters)
|
||||
|
||||
UncivGame.Current = game
|
||||
UncivGame.Current.settings = GameSettings().apply { showTutorials = false }
|
||||
UncivGame.Current.settings = GameSettings().apply {
|
||||
showTutorials = false
|
||||
turnsBetweenAutosaves = 10000
|
||||
}
|
||||
|
||||
RulesetCache.loadRulesets(true)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user