mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 04:43:05 -04:00
fix no victoryTypes for the first time gaming with "quick game" opion. (#7785)
This commit is contained in:
parent
351c6aa798
commit
d65c756e4c
@ -227,7 +227,13 @@ class MainMenuScreen: BaseScreen(), RecreateOnResize {
|
||||
val newGame: GameInfo
|
||||
// Can fail when starting the game...
|
||||
try {
|
||||
newGame = GameStarter.startNewGame(GameSetupInfo.fromSettings("Chieftain"))
|
||||
val gameInfo = GameSetupInfo.fromSettings("Chieftain")
|
||||
if (gameInfo.gameParameters.victoryTypes.isEmpty()) {
|
||||
val ruleSet = RulesetCache.getComplexRuleset(gameInfo.gameParameters)
|
||||
gameInfo.gameParameters.victoryTypes.addAll(ruleSet.victories.keys)
|
||||
}
|
||||
newGame = GameStarter.startNewGame(gameInfo)
|
||||
|
||||
} catch (notAPlayer: UncivShowableException) {
|
||||
val (message) = LoadGameScreen.getLoadExceptionMessage(notAPlayer)
|
||||
launchOnGLThread { ToastPopup(message, this@MainMenuScreen) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user