mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 14:02:48 +07:00
Performance improvements
- containsBuildingUnique uses map, not array search
This commit is contained in:
parent
51583ab588
commit
e634423b2f
@ -274,7 +274,7 @@ class City : IsPartOfGameInfoSerialization {
|
||||
|
||||
|
||||
fun containsBuildingUnique(uniqueType: UniqueType) =
|
||||
cityConstructions.getBuiltBuildings().flatMap { it.uniqueObjects }.any { it.isOfType(uniqueType) }
|
||||
cityConstructions.builtBuildingUniqueMap.getUniques(uniqueType).any()
|
||||
|
||||
fun getGreatPersonPercentageBonus(): Int{
|
||||
var allGppPercentageBonus = 0
|
||||
|
Loading…
Reference in New Issue
Block a user