mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 10:18:26 +07:00
4.12.6
This commit is contained in:
@ -401,7 +401,7 @@ class RulesetValidator(val ruleset: Ruleset) {
|
||||
lines: RulesetErrorList,
|
||||
tryFixUnknownUniques: Boolean
|
||||
) {
|
||||
if (ruleset.terrains.values.none { it.type == TerrainType.Land && !it.impassable })
|
||||
if (ruleset.terrains.values.none { it.type == TerrainType.Land && !it.impassable && !it.hasUnique(UniqueType.NoNaturalGeneration) })
|
||||
lines.add("No passable land terrains exist!", sourceObject = null)
|
||||
|
||||
for (terrain in ruleset.terrains.values) {
|
||||
|
@ -489,7 +489,7 @@ class ModManagementScreen private constructor(
|
||||
val repoName = modFolder.name() // repo.name still has the replaced "-"'s
|
||||
ToastPopup("[$repoName] Downloaded!", this@ModManagementScreen)
|
||||
reloadCachesAfterModChange()
|
||||
UncivGame.Current.translations.tryReadTranslationForCurrentLanguage()
|
||||
|
||||
updateInstalledModUIData(repoName)
|
||||
refreshInstalledModTable()
|
||||
lastSelectedButton?.let { syncOnlineSelected(repoName, it) }
|
||||
@ -657,15 +657,16 @@ class ModManagementScreen private constructor(
|
||||
|
||||
private fun reloadCachesAfterModChange() {
|
||||
RulesetCache.loadRulesets()
|
||||
ImageGetter.reloadImages()
|
||||
TileSetCache.loadTileSetConfigs()
|
||||
ImageGetter.reloadImages()
|
||||
UncivGame.Current.translations.tryReadTranslationForCurrentLanguage()
|
||||
}
|
||||
|
||||
internal fun refreshOnlineModTable() {
|
||||
if (runningSearchJob != null) {
|
||||
ToastPopup("Sorting and filtering needs to wait until the online query finishes", this)
|
||||
return // cowardice: prevent concurrent modification, avoid a manager layer
|
||||
}
|
||||
// if (runningSearchJob != null) {
|
||||
// ToastPopup("Sorting and filtering needs to wait until the online query finishes", this)
|
||||
// return // cowardice: prevent concurrent modification, avoid a manager layer
|
||||
// }
|
||||
|
||||
val newHeaderText = optionsManager.getOnlineHeader()
|
||||
onlineHeaderLabel?.setText(newHeaderText)
|
||||
|
Reference in New Issue
Block a user