mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 06:16:37 -04:00
Added button to reload all rulesets - very helpful if you're working on mods and adding things gradually :)
This commit is contained in:
parent
9da66c8c08
commit
c9d487638c
@ -550,6 +550,7 @@ Continuous rendering =
|
|||||||
When disabled, saves battery life but certain animations will be suspended =
|
When disabled, saves battery life but certain animations will be suspended =
|
||||||
Order trade offers by amount =
|
Order trade offers by amount =
|
||||||
Check extension mods based on vanilla =
|
Check extension mods based on vanilla =
|
||||||
|
Reload mods =
|
||||||
Checking mods for errors... =
|
Checking mods for errors... =
|
||||||
No problems found. =
|
No problems found. =
|
||||||
Autoupdate mod uniques =
|
Autoupdate mod uniques =
|
||||||
|
@ -53,7 +53,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
|
|||||||
/** Used for AlertType.WonderBuilt, and as sub-text in Nation and Tech descriptions */
|
/** Used for AlertType.WonderBuilt, and as sub-text in Nation and Tech descriptions */
|
||||||
fun getShortDescription(ruleset: Ruleset): String { // should fit in one line
|
fun getShortDescription(ruleset: Ruleset): String { // should fit in one line
|
||||||
val infoList = mutableListOf<String>()
|
val infoList = mutableListOf<String>()
|
||||||
(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))
|
for ((key, value) in getStatPercentageBonuses(null))
|
||||||
infoList += "+${value.toInt()}% ${key.name.tr()}"
|
infoList += "+${value.toInt()}% ${key.name.tr()}"
|
||||||
|
|
||||||
|
@ -263,6 +263,11 @@ class OptionsPopup(val previousScreen: BaseScreen) : Popup(previousScreen) {
|
|||||||
|
|
||||||
private fun getModCheckTab() = Table(BaseScreen.skin).apply {
|
private fun getModCheckTab() = Table(BaseScreen.skin).apply {
|
||||||
defaults().pad(10f).align(Align.top)
|
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 {
|
modCheckCheckBox = "Check extension mods based on vanilla".toCheckBox {
|
||||||
runModChecker(it)
|
runModChecker(it)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user