mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-09 20:29:50 +07:00
Update TileInfo.kt and GameOptionsTable.kt (#2990)
* check if Improvement in question isGreatImprovement before applying buff that only Great Improvements are supposed to have * update() GameOptionsTable when player selects or unselects mod some mods might change list of difficulties or eras * run onChange() when SelectBox is added so if user select modded difficulty and unselect mod that added it gameParameters.difficulty will be updated * add [+stats] from every [baseTerrain or terrainFeature] Nation unique
This commit is contained in:
parent
7efbe6feb2
commit
dc1181f3fd
@ -184,6 +184,12 @@ open class TileInfo {
|
||||
stats.add(Stats.parse(unique.params[0]))
|
||||
}
|
||||
|
||||
if(city!=null) for(unique in city.civInfo.getMatchingUniques("[] from every []")) {
|
||||
val tileType = unique.params[1]
|
||||
if (baseTerrain == tileType || terrainFeature == tileType)
|
||||
stats.add(Stats.parse(unique.params[0]))
|
||||
}
|
||||
|
||||
if (naturalWonder != null) {
|
||||
val wonder = getNaturalWonder()
|
||||
stats.add(wonder)
|
||||
@ -243,7 +249,7 @@ open class TileInfo {
|
||||
|
||||
if(city!=null)
|
||||
for(unique in city.civInfo.getMatchingUniques("[] from every []")) {
|
||||
if (improvement.name == unique.params[1] || (unique.params[1]=="Great Improvement"))
|
||||
if (improvement.name == unique.params[1] || (unique.params[1]=="Great Improvement" && improvement.isGreatImprovement()))
|
||||
stats.add(Stats.parse(unique.params[0]))
|
||||
}
|
||||
|
||||
|
@ -109,6 +109,7 @@ class GameOptionsTable(val previousScreen: IPreviousScreen, val updatePlayerPick
|
||||
val selectBox = TranslatedSelectBox(values, initialState, CameraStageBaseScreen.skin)
|
||||
selectBox.isDisabled = locked
|
||||
selectBox.onChange { onChange(selectBox.selected.value) }
|
||||
onChange(selectBox.selected.value)
|
||||
add(selectBox).fillX().row()
|
||||
}
|
||||
|
||||
@ -190,6 +191,7 @@ class GameOptionsTable(val previousScreen: IPreviousScreen, val updatePlayerPick
|
||||
if (checkBox.isChecked) gameParameters.mods.add(mod.name)
|
||||
else gameParameters.mods.remove(mod.name)
|
||||
reloadRuleset()
|
||||
update()
|
||||
var desiredCiv = ""
|
||||
if (checkBox.isChecked) {
|
||||
val modNations = RulesetCache[mod.name]?.nations
|
||||
|
Loading…
Reference in New Issue
Block a user