mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 09:48:12 +07:00
Fixed broken tests
This commit is contained in:
@ -88,7 +88,7 @@
|
|||||||
"terrainsCanBeBuiltOn": ["Plains","Grassland","Desert","Hill","Tundra","Snow"],
|
"terrainsCanBeBuiltOn": ["Plains","Grassland","Desert","Hill","Tundra","Snow"],
|
||||||
"turnsToBuild": 6,
|
"turnsToBuild": 6,
|
||||||
"techRequired": "Engineering",
|
"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
|
// Transportation
|
||||||
|
@ -197,11 +197,12 @@ object ImageGetter {
|
|||||||
|
|
||||||
fun getResourceImage(resourceName: String, size:Float): Actor {
|
fun getResourceImage(resourceName: String, size:Float): Actor {
|
||||||
val iconGroup = getImage("ResourceIcons/$resourceName").surroundWithCircle(size)
|
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 {
|
when {
|
||||||
resource.food>0 -> iconGroup.circle.color= foodCircleColor
|
resource.food > 0 -> iconGroup.circle.color = foodCircleColor
|
||||||
resource.production>0 -> iconGroup.circle.color= productionCircleColor
|
resource.production > 0 -> iconGroup.circle.color = productionCircleColor
|
||||||
resource.gold>0 -> iconGroup.circle.color= goldCircleColor
|
resource.gold > 0 -> iconGroup.circle.color = goldCircleColor
|
||||||
}
|
}
|
||||||
|
|
||||||
if(resource.resourceType==ResourceType.Luxury){
|
if(resource.resourceType==ResourceType.Luxury){
|
||||||
|
Reference in New Issue
Block a user