Fixes a problem with free buildings provided in other cities not being free (#5470)

This commit is contained in:
Xander Lenstra 2021-10-12 16:21:04 +02:00 committed by GitHub
parent 36711f70ad
commit 9abc3ddb6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,7 @@ class CivConstructions {
fun getFreeBuildings(cityId: String): HashSet<String> {
val toReturn = freeBuildings[cityId] ?: hashSetOf()
for (city in civInfo.cities) {
toReturn.addAll(city.cityConstructions.freeBuildingsProvidedFromThisCity[city.id] ?: hashSetOf())
toReturn.addAll(city.cityConstructions.freeBuildingsProvidedFromThisCity[cityId] ?: hashSetOf())
}
return toReturn
}