mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-05 21:11:35 +07:00
Fixed Scenario mods being undownloadable and needing to restart game to access Scenario picker
This commit is contained in:
parent
96addf305b
commit
f2141d3393
@ -150,7 +150,7 @@ object Github {
|
||||
}
|
||||
|
||||
private fun isValidModFolder(dir: FileHandle): Boolean {
|
||||
val goodFolders = listOf("Images", "jsons", "maps", "music", "sounds", "Images\\..*")
|
||||
val goodFolders = listOf("Images", "jsons", "maps", "music", "sounds", "Images\\..*", "scenarios")
|
||||
.map { Regex(it, RegexOption.IGNORE_CASE) }
|
||||
val goodFiles = listOf(".*\\.atlas", ".*\\.png", "preview.jpg", ".*\\.md", "Atlases.json", ".nomedia", "license")
|
||||
.map { Regex(it, RegexOption.IGNORE_CASE) }
|
||||
|
@ -139,7 +139,11 @@ class ModManagementScreen private constructor(
|
||||
if (game.settings.tileSet !in tileSets) {
|
||||
game.settings.tileSet = tileSets.first()
|
||||
}
|
||||
game.popScreen()
|
||||
val screen = game.popScreen()
|
||||
|
||||
// We want to immediately display/hide Scenario button based on changes
|
||||
if (screen is MainMenuScreen)
|
||||
screen.game.replaceCurrentScreen(MainMenuScreen())
|
||||
}
|
||||
closeButton.keyShortcuts.add(KeyCharAndCode.BACK)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user