mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-11 11:28:03 +07:00
Merge pull request #7566 from SimonCeder/globalquestscheck
Invalid players removed from global quests
This commit is contained in:
commit
605956c4d5
@ -234,6 +234,9 @@ class QuestManager : IsPartOfGameInfoSerialization {
|
||||
}
|
||||
|
||||
private fun handleGlobalQuests() {
|
||||
// Remove any participants that are no longer valid because of being dead or at war with the CS
|
||||
assignedQuests.removeAll { it.isGlobal() &&
|
||||
!canAssignAQuestTo(civInfo.gameInfo.getCivilization(it.assignee)) }
|
||||
val globalQuestsExpired = assignedQuests.filter { it.isGlobal() && it.isExpired() }.map { it.questName }.distinct()
|
||||
for (globalQuestName in globalQuestsExpired)
|
||||
handleGlobalQuest(globalQuestName)
|
||||
|
Loading…
Reference in New Issue
Block a user