Total conversion mods should handle missing specialists (altough they really should deal with it)

This commit is contained in:
Yair Morgenstern 2020-10-07 14:03:27 +03:00
parent e690e3bcea
commit 8c1913c2c4

View File

@ -246,7 +246,8 @@ class CityInfo {
fun getGreatPersonMap():StatMap {
val stats = StatMap()
for((specialist, amount) in population.getNewSpecialists())
stats.add("Specialists", getRuleset().specialists[specialist]!!.greatPersonPoints.times(amount))
if (getRuleset().specialists.containsKey(specialist)) // To solve problems in total remake mods
stats.add("Specialists", getRuleset().specialists[specialist]!!.greatPersonPoints.times(amount))
val buildingStats = Stats()
for (building in cityConstructions.getBuiltBuildings())