From 93bf69f3d5746f21291e1be11d0d315f3711e94b Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 5 Oct 2020 23:20:49 +0300 Subject: [PATCH] Fixes for minor bugs from the previous version --- core/src/com/unciv/logic/civilization/QuestManager.kt | 2 ++ core/src/com/unciv/ui/cityscreen/SpecialistAllocationTable.kt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/src/com/unciv/logic/civilization/QuestManager.kt b/core/src/com/unciv/logic/civilization/QuestManager.kt index f881909669..3c8f57a159 100644 --- a/core/src/com/unciv/logic/civilization/QuestManager.kt +++ b/core/src/com/unciv/logic/civilization/QuestManager.kt @@ -75,6 +75,8 @@ class QuestManager { return } + if (civInfo.cities.none()) return // don't assign quests until we have a city + seedGlobalQuestCountdown() seedIndividualQuestsCountdown() diff --git a/core/src/com/unciv/ui/cityscreen/SpecialistAllocationTable.kt b/core/src/com/unciv/ui/cityscreen/SpecialistAllocationTable.kt index 8a9a2f0fa1..15f9d2e2c5 100644 --- a/core/src/com/unciv/ui/cityscreen/SpecialistAllocationTable.kt +++ b/core/src/com/unciv/ui/cityscreen/SpecialistAllocationTable.kt @@ -14,6 +14,8 @@ class SpecialistAllocationTable(val cityScreen: CityScreen): Table(CameraStageBa clear() for ((specialistName, amount) in cityInfo.population.getMaxSpecialists()) { + if (!cityInfo.getRuleset().specialists.containsKey(specialistName)) // specialist doesn't exist in this ruleset, probably a mod + continue val newSpecialists = cityInfo.population.getNewSpecialists() val assignedSpecialists = newSpecialists[specialistName]!! val maxSpecialists = cityInfo.population.getMaxSpecialists()[specialistName]!!