mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 13:49:54 +07:00
3.11.0-patch1
Solved some errors that occured as a result of the recent changes assuming the specialists exist, which is not true in revamp mods
This commit is contained in:
@ -298,7 +298,7 @@ open class TileInfo {
|
||||
/** Without regards to what civinfo it is, a lot of the checks are ust for the improvement on the tile.
|
||||
* Doubles as a check for the map editor.
|
||||
*/
|
||||
fun canImprovementBeBuiltHere(improvement: TileImprovement, resourceIsVisible:Boolean = true): Boolean {
|
||||
fun canImprovementBeBuiltHere(improvement: TileImprovement, resourceIsVisible:Boolean = resource!=null): Boolean {
|
||||
val topTerrain = getLastTerrain()
|
||||
|
||||
return when {
|
||||
|
@ -152,7 +152,8 @@ class CityInfoTable(private val cityScreen: CityScreen) : Table(CameraStageBaseS
|
||||
specialistIcons.row().size(20f).pad(5f)
|
||||
for (stat in building.specialistSlots!!.toHashMap()) {
|
||||
if (stat.value == 0f) continue
|
||||
val specialist = cityInfo.getRuleset().specialists[cityInfo.population.specialistNameByStat(stat.key)]!!
|
||||
val specialist = cityInfo.getRuleset().specialists[cityInfo.population.specialistNameByStat(stat.key)]
|
||||
if (specialist == null) continue // probably a mod that doesn't have the specialist defined yet
|
||||
for (i in 0 until stat.value.toInt())
|
||||
specialistIcons.add(ImageGetter.getSpecialistIcon(specialist.colorObject)).size(20f)
|
||||
}
|
||||
|
Reference in New Issue
Block a user