From d65c756e4cd41db5170dbeac9377b7919e74092b Mon Sep 17 00:00:00 2001 From: nacro711072 Date: Mon, 12 Sep 2022 05:34:47 +0800 Subject: [PATCH] fix no victoryTypes for the first time gaming with "quick game" opion. (#7785) --- core/src/com/unciv/MainMenuScreen.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/MainMenuScreen.kt b/core/src/com/unciv/MainMenuScreen.kt index 40beb8787e..3673ddf216 100644 --- a/core/src/com/unciv/MainMenuScreen.kt +++ b/core/src/com/unciv/MainMenuScreen.kt @@ -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) }