mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-08 23:08:35 +07:00
Fix missing icons and translations in civilopedia accessed from main menu (#6922)
* Fix blank icons * Apply translations to civilopedia + use complex ruleset * Unused import * Typo * Simplify definition
This commit is contained in:

committed by
GitHub

parent
156db1f5f7
commit
fe0ec08e61
@ -18,6 +18,7 @@ import com.unciv.models.ruleset.RulesetCache
|
||||
import com.unciv.ui.multiplayer.MultiplayerScreen
|
||||
import com.unciv.ui.mapeditor.*
|
||||
import com.unciv.models.metadata.GameSetupInfo
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.ui.civilopedia.CivilopediaScreen
|
||||
import com.unciv.ui.crashhandling.launchCrashHandling
|
||||
import com.unciv.ui.crashhandling.postCrashHandlingRunnable
|
||||
@ -238,9 +239,13 @@ class MainMenuScreen: BaseScreen() {
|
||||
}
|
||||
|
||||
private fun openCivilopedia() {
|
||||
val ruleset =RulesetCache[game.settings.lastGameSetup?.gameParameters?.baseRuleset]
|
||||
?: RulesetCache[BaseRuleset.Civ_V_GnK.fullName]
|
||||
?: return
|
||||
val rulesetParameters = game.settings.lastGameSetup?.gameParameters
|
||||
val ruleset = if (rulesetParameters == null)
|
||||
RulesetCache[BaseRuleset.Civ_V_GnK.fullName] ?: return
|
||||
else RulesetCache.getComplexRuleset(rulesetParameters)
|
||||
UncivGame.Current.translations.translationActiveMods = ruleset.mods
|
||||
ImageGetter.setNewRuleset(ruleset)
|
||||
setSkin()
|
||||
game.setScreen(CivilopediaScreen(ruleset, this))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user