It's probably a good idea to actually convert Hanse's to Banks rather than remove them entirely, actually (#5650)

* It's probably a good idea to actually convert Hanse's to Banks rather than remove them entirely, actually

* Remove checks for the unique as well

* Might as well use the intended function for it too
This commit is contained in:
Xander Lenstra 2021-11-08 21:50:43 +01:00 committed by GitHub
parent 2250d75b4c
commit fb1b494470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -41,9 +41,13 @@ object BackwardCompatibility {
for (city in civilizations.asSequence().flatMap { it.cities.asSequence() }) {
for (building in city.cityConstructions.builtBuildings.toHashSet())
changeBuildingNameIfNotInRuleset(ruleSet, city.cityConstructions, "Hanse", "Bank")
for (building in city.cityConstructions.builtBuildings.toHashSet()) {
if (!ruleSet.buildings.containsKey(building))
city.cityConstructions.builtBuildings.remove(building)
}
fun isInvalidConstruction(construction: String) =
!ruleSet.buildings.containsKey(construction)
@ -67,7 +71,7 @@ object BackwardCompatibility {
civInfo.tech.techsResearched.remove(tech)
for (policy in civInfo.policies.adoptedPolicies.toList())
if (!ruleSet.policies.containsKey(policy)
// Converstion code for deprecated policies since 3.16.15
// Conversion code for deprecated policies since 3.16.15
&& !(policy == "Patronage " || policy == "Patronage Complete")
//
)

View File

@ -190,9 +190,6 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
stats.add(Stat.valueOf(unique.params[1]), unique.params[0].toFloat())
}
if (uniques.contains("+5% Production for every Trade Route with a City-State in the empire"))
stats.production += 5 * civInfo.citiesConnectedToCapitalToMediums.count { it.key.civInfo.isCityState() }
return stats
}