mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -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.Gdx
|
||||||
import com.badlogic.gdx.files.FileHandle
|
import com.badlogic.gdx.files.FileHandle
|
||||||
import com.badlogic.gdx.utils.Json
|
import com.badlogic.gdx.utils.Json
|
||||||
|
import com.unciv.UncivGame
|
||||||
import com.unciv.logic.civilization.CivilizationInfo
|
import com.unciv.logic.civilization.CivilizationInfo
|
||||||
import com.unciv.models.metadata.GameSettings
|
import com.unciv.models.metadata.GameSettings
|
||||||
import com.unciv.ui.utils.ImageGetter
|
import com.unciv.ui.utils.ImageGetter
|
||||||
@ -57,11 +58,8 @@ object GameSaver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getGeneralSettingsFile(): FileHandle {
|
fun getGeneralSettingsFile(): FileHandle {
|
||||||
try {
|
return if (UncivGame.Current.consoleMode) FileHandle(settingsFileName)
|
||||||
return Gdx.files.local(settingsFileName)
|
else Gdx.files.local(settingsFileName)
|
||||||
} catch (ex: NullPointerException) {
|
|
||||||
return FileHandle(settingsFileName)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getGeneralSettings(): GameSettings {
|
fun getGeneralSettings(): GameSettings {
|
||||||
|
@ -35,7 +35,10 @@ internal object ConsoleLauncher {
|
|||||||
val game = UncivGame(consoleParameters)
|
val game = UncivGame(consoleParameters)
|
||||||
|
|
||||||
UncivGame.Current = game
|
UncivGame.Current = game
|
||||||
UncivGame.Current.settings = GameSettings().apply { showTutorials = false }
|
UncivGame.Current.settings = GameSettings().apply {
|
||||||
|
showTutorials = false
|
||||||
|
turnsBetweenAutosaves = 10000
|
||||||
|
}
|
||||||
|
|
||||||
RulesetCache.loadRulesets(true)
|
RulesetCache.loadRulesets(true)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user