Make UncivGame.isInitialized inaccessible outside of the class hierarchy (#9651)

* Make UncivGame.isInitialized inaccessible outside of the class hierarchy

* Fix JvmName
This commit is contained in:
SomeTroglodyte
2023-06-25 08:03:44 +02:00
committed by GitHub
parent a246baa333
commit 650a43aa3b
3 changed files with 5 additions and 2 deletions

View File

@ -78,4 +78,5 @@ class AndroidGame(private val activity: Activity) : UncivGame() {
}
}
fun isInitializedProxy() = super.isInitialized
}

View File

@ -70,7 +70,7 @@ open class AndroidLauncher : AndroidApplication() {
override fun onPause() {
val game = this.game!!
if (game.isInitialized
if (game.isInitializedProxy()
&& game.gameInfo != null
&& game.settings.multiplayer.turnCheckerEnabled
&& game.files.getMultiplayerSaves().any()

View File

@ -137,7 +137,9 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci
var worldScreen: WorldScreen? = null
private set
var isInitialized = false
/** Flag used only during initialization until the end of [create] */
protected var isInitialized = false
private set
/** A wrapped render() method that crashes to [CrashScreen] on a unhandled exception or error. */
private val wrappedCrashHandlingRender = { super.render() }.wrapCrashHandlingUnit()