mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-23 01:24:26 +07:00
Fix crash when attacking city with disabled overlays (#8599)
Co-authored-by: tunerzinc@gmail.com <vfylfhby>
This commit is contained in:
parent
c77ab71381
commit
8f56a88990
@ -24,7 +24,11 @@ object BattleTableHelpers {
|
||||
sequence {
|
||||
val tileGroup = mapHolder.tileGroups[combatant.getTile()]!!
|
||||
when {
|
||||
combatant.isCity() -> yield(tileGroup.layerMisc.improvementIcon!!)
|
||||
combatant.isCity() -> {
|
||||
val icon = tileGroup.layerMisc.improvementIcon
|
||||
if (icon != null)
|
||||
yield(icon)
|
||||
}
|
||||
else -> {
|
||||
val slot = if (combatant.isCivilian()) 0 else 1
|
||||
yieldAll((tileGroup.layerUnitArt.getChild(slot) as Group).children)
|
||||
|
Loading…
Reference in New Issue
Block a user