mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-11 11:28:03 +07:00
Fixed bug where great prophets could be chosen as free great persons when religion was disabled (#4518)
This commit is contained in:
parent
482a1260ca
commit
9efcc4f423
@ -458,8 +458,12 @@ class CivilizationInfo {
|
||||
}
|
||||
|
||||
|
||||
fun getGreatPeople() = gameInfo.ruleSet.units.values.asSequence()
|
||||
.filter { it.isGreatPerson() }.map { getEquivalentUnit(it.name) }.toHashSet()
|
||||
fun getGreatPeople(): HashSet<BaseUnit> {
|
||||
val greatPeople = gameInfo.ruleSet.units.values.asSequence()
|
||||
.filter { it.isGreatPerson() }.map { getEquivalentUnit(it.name) }
|
||||
return if (!gameInfo.hasReligionEnabled()) greatPeople.filter { !it.uniques.contains("Great Person - [Faith]")}.toHashSet()
|
||||
else greatPeople.toHashSet()
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user