Performance improvements

- containsBuildingUnique uses map, not array search
This commit is contained in:
Yair Morgenstern 2023-06-18 00:01:36 +03:00
parent 51583ab588
commit e634423b2f

View File

@ -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