Natural wonders (and other terrains with no RGB) now have a golden color on the minimap
This commit is contained in:
parent
e0171ef97a
commit
ebfd79636f
1 changed files with 5 additions and 2 deletions
|
@ -2,8 +2,8 @@ package com.unciv.models.ruleset.tile
|
|||
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.unciv.models.ruleset.Ruleset
|
||||
import com.unciv.models.translations.tr
|
||||
import com.unciv.models.stats.NamedStats
|
||||
import com.unciv.models.translations.tr
|
||||
import com.unciv.ui.utils.colorFromRGB
|
||||
|
||||
class Terrain : NamedStats() {
|
||||
|
@ -61,5 +61,8 @@ class Terrain : NamedStats() {
|
|||
var impassable = false
|
||||
var rough = false
|
||||
|
||||
fun getColor(): Color = colorFromRGB(RGB!![0], RGB!![1], RGB!![2])
|
||||
fun getColor(): Color {
|
||||
if (RGB == null) return Color.GOLD
|
||||
return colorFromRGB(RGB!![0], RGB!![1], RGB!![2])
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue