mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-24 05:31:22 +07:00
Fixed issue #6649 by checking for internet connection before starting the game if "online multiplayer" is selected
Many thanks to @SomeTroglodyte for most of the code and for explanations
This commit is contained in:
parent
f293e77786
commit
3a707b8f3c
@ -158,13 +158,7 @@ class MultiplayerScreen(previousScreen: BaseScreen) : PickerScreen() {
|
||||
else
|
||||
GameSaver.saveGame(gamePreview, gameName)
|
||||
|
||||
postCrashHandlingRunnable {
|
||||
val mods = sequenceOf(gamePreview.gameParameters.baseRuleset) + gamePreview.gameParameters.mods.asSequence()
|
||||
val missingMods = mods.filterNot { it.isEmpty() || it in RulesetCache }
|
||||
if (missingMods.any())
|
||||
ToastPopup("Missing mods: [${missingMods.joinToString("\n", limit = 32)}]", this, 5000L)
|
||||
reloadGameListUI()
|
||||
}
|
||||
postCrashHandlingRunnable { reloadGameListUI() }
|
||||
} catch (ex: FileNotFoundException) {
|
||||
// Game is so old that a preview could not be found on dropbox lets try the real gameInfo instead
|
||||
try {
|
||||
@ -432,4 +426,4 @@ class MultiplayerScreen(previousScreen: BaseScreen) : PickerScreen() {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user