Suppress policy branch unlock notification when incompatible (#4288)

This commit is contained in:
SomeTroglodyte 2021-06-27 20:20:29 +02:00 committed by GitHub
parent 0f0abad5ea
commit f7a1d0cdee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -261,7 +261,7 @@ class TechManager {
knownCiv.addNotification("[${civInfo.civName}] has entered the [$currentEra]!", civInfo.civName, NotificationIcon.Science)
}
}
for (it in getRuleset().policyBranches.values.filter { it.era == currentEra }) {
for (it in getRuleset().policyBranches.values.filter { it.era == currentEra && civInfo.policies.isAdoptable(it) }) {
civInfo.addNotification("[" + it.name + "] policy branch unlocked!", NotificationIcon.Culture)
}
}