mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-11 11:28:03 +07:00
Simplified CityInfo.getMatchingUniques
This commit is contained in:
parent
6d3eabde22
commit
5a01a319be
@ -824,11 +824,10 @@ class CityInfo {
|
||||
// Finds matching uniques provided from both local and non-local sources.
|
||||
fun getMatchingUniques(
|
||||
uniqueType: UniqueType,
|
||||
stateForConditionals: StateForConditionals = StateForConditionals(civInfo, this),
|
||||
localUniques: Sequence<Unique> = getLocalMatchingUniques(uniqueType, stateForConditionals),
|
||||
stateForConditionals: StateForConditionals = StateForConditionals(civInfo, this)
|
||||
): Sequence<Unique> {
|
||||
return civInfo.getMatchingUniques(uniqueType, stateForConditionals, this) +
|
||||
localUniques.filter { it.isOfType(uniqueType) && it.conditionalsApply(stateForConditionals) }
|
||||
getLocalMatchingUniques(uniqueType, stateForConditionals)
|
||||
}
|
||||
|
||||
fun getLocalMatchingUniques(uniqueType: UniqueType, stateForConditionals: StateForConditionals? = null): Sequence<Unique> {
|
||||
|
Loading…
Reference in New Issue
Block a user