diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index a541f5a800..f63aae3ee2 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -550,6 +550,7 @@ Continuous rendering = When disabled, saves battery life but certain animations will be suspended = Order trade offers by amount = Check extension mods based on vanilla = +Reload mods = Checking mods for errors... = No problems found. = Autoupdate mod uniques = diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index 4c3226c4cb..5c7e5f798d 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -53,7 +53,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction { /** Used for AlertType.WonderBuilt, and as sub-text in Nation and Tech descriptions */ fun getShortDescription(ruleset: Ruleset): String { // should fit in one line val infoList = mutableListOf() - (this as Stats).toString().also { if (it.isNotEmpty()) infoList += it } + this.clone().toString().also { if (it.isNotEmpty()) infoList += it } for ((key, value) in getStatPercentageBonuses(null)) infoList += "+${value.toInt()}% ${key.name.tr()}" diff --git a/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt b/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt index 0b23e98f9f..8bf5f74746 100644 --- a/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt +++ b/core/src/com/unciv/ui/worldscreen/mainmenu/OptionsPopup.kt @@ -263,6 +263,11 @@ class OptionsPopup(val previousScreen: BaseScreen) : Popup(previousScreen) { private fun getModCheckTab() = Table(BaseScreen.skin).apply { defaults().pad(10f).align(Align.top) + val reloadModsButton = "Reload mods".toTextButton().onClick { + RulesetCache.loadRulesets() + runModChecker(modCheckCheckBox!!.isChecked) + } + add(reloadModsButton).row() modCheckCheckBox = "Check extension mods based on vanilla".toCheckBox { runModChecker(it) }