mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-09 07:18:57 +07:00
Fallback image for modded techs - see #8158
This commit is contained in:
@ -370,9 +370,11 @@ object ImageGetter {
|
||||
}
|
||||
|
||||
fun getTechIconGroup(techName: String, circleSize: Float): IconCircleGroup {
|
||||
val techIconColor = ruleset.eras[ruleset.technologies[techName]?.era()]?.getColor()?.darken(0.6f)
|
||||
?: Color.BLACK
|
||||
return getImage("TechIcons/$techName").apply { color = techIconColor }
|
||||
val techIconColor = ruleset.eras[ruleset.technologies[techName]?.era()]?.getColor()?.darken(0.6f) ?: Color.BLACK
|
||||
val image =
|
||||
if (imageExists("TechIcons/$techName")) getImage("TechIcons/$techName")
|
||||
else getImage("TechIcons/Fallback")
|
||||
return image.apply { color = techIconColor }
|
||||
.surroundWithCircle(circleSize)
|
||||
.surroundWithThinCircle(techIconColor)
|
||||
}
|
||||
|
Reference in New Issue
Block a user