mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-18 11:49:19 +07:00
Solved crash for badly defined mods like REKmod
This commit is contained in:
@ -230,7 +230,8 @@ open class TileInfo {
|
|||||||
val resource = getTileResource()
|
val resource = getTileResource()
|
||||||
stats.add(getTileResource()) // resource base
|
stats.add(getTileResource()) // resource base
|
||||||
if (resource.building != null && city != null && city.cityConstructions.isBuilt(resource.building!!)) {
|
if (resource.building != null && city != null && city.cityConstructions.isBuilt(resource.building!!)) {
|
||||||
val resourceBuilding = tileMap.gameInfo.ruleSet.buildings[resource.building!!]!!
|
val resourceBuilding = tileMap.gameInfo.ruleSet.buildings[resource.building!!]
|
||||||
|
if (resourceBuilding != null && resourceBuilding.resourceBonusStats != null)
|
||||||
stats.add(resourceBuilding.resourceBonusStats!!) // resource-specific building (eg forge, stable) bonus
|
stats.add(resourceBuilding.resourceBonusStats!!) // resource-specific building (eg forge, stable) bonus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user