From ebfd79636f05ab4fcdf869c4ab4efcbe41cfd791 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Thu, 19 Dec 2019 17:45:20 +0200 Subject: [PATCH] Natural wonders (and other terrains with no RGB) now have a golden color on the minimap --- core/src/com/unciv/models/ruleset/tile/Terrain.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/models/ruleset/tile/Terrain.kt b/core/src/com/unciv/models/ruleset/tile/Terrain.kt index b76feb546c..283f7cc1bd 100644 --- a/core/src/com/unciv/models/ruleset/tile/Terrain.kt +++ b/core/src/com/unciv/models/ruleset/tile/Terrain.kt @@ -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]) + } } \ No newline at end of file