Fixed broken tests

This commit is contained in:
Yair Morgenstern 2020-08-09 21:37:09 +03:00
parent 38490ca1cc
commit be51735fdf
2 changed files with 6 additions and 5 deletions

View file

@ -88,7 +88,7 @@
"terrainsCanBeBuiltOn": ["Plains","Grassland","Desert","Hill","Tundra","Snow"],
"turnsToBuild": 6,
"techRequired": "Engineering",
"uniques": ["Gives a defensive bonus of [50]%", "Can be built outside your borders"]]
"uniques": ["Gives a defensive bonus of [50]%", "Can be built outside your borders"]
},
// Transportation

View file

@ -197,11 +197,12 @@ object ImageGetter {
fun getResourceImage(resourceName: String, size:Float): Actor {
val iconGroup = getImage("ResourceIcons/$resourceName").surroundWithCircle(size)
val resource = ruleset.tileResources[resourceName]!!
val resource = ruleset.tileResources[resourceName]
if(resource==null) throw Exception("No resource $resourceName found in ruleset!")
when {
resource.food>0 -> iconGroup.circle.color= foodCircleColor
resource.production>0 -> iconGroup.circle.color= productionCircleColor
resource.gold>0 -> iconGroup.circle.color= goldCircleColor
resource.food > 0 -> iconGroup.circle.color = foodCircleColor
resource.production > 0 -> iconGroup.circle.color = productionCircleColor
resource.gold > 0 -> iconGroup.circle.color = goldCircleColor
}
if(resource.resourceType==ResourceType.Luxury){