Minor linting

This commit is contained in:
yairm210
2021-11-05 15:07:30 +02:00
parent 09c40002f0
commit 74d1d0451c
2 changed files with 3 additions and 3 deletions

View File

@ -98,7 +98,7 @@ class CityConstructions {
// the stats a city receives from wonders. It is then called with `unique` being the list // the stats a city receives from wonders. It is then called with `unique` being the list
// of all specifically non-local uniques of all cities. // of all specifically non-local uniques of all cities.
// //
// This averts the problem, albeit it barely, and it might change in the future without // This averts the problem, albeit barely, and it might change in the future without
// anyone noticing, which might lead to further bugs. So why can't these two unique checks // anyone noticing, which might lead to further bugs. So why can't these two unique checks
// just be merged then? Because of another problem. // just be merged then? Because of another problem.
// //
@ -110,7 +110,7 @@ class CityConstructions {
// while the local uniques with this placeholderText are from buildings, but this is in no // while the local uniques with this placeholderText are from buildings, but this is in no
// way a given. In reality, there should be functions getBuildingStats and getWonderStats, // way a given. In reality, there should be functions getBuildingStats and getWonderStats,
// to solve this, with getStats merely adding these two together. // to solve this, with getStats merely adding these two together.
for (unique in cityInfo.getLocalMatchingUniques("[] per [] population []") for (unique in cityInfo.getLocalMatchingUniques(UniqueType.StatsPerPopulation)
.filter { cityInfo.matchesFilter(it.params[2])} .filter { cityInfo.matchesFilter(it.params[2])}
) { ) {
stats.add(unique.stats.times(cityInfo.population.population / unique.params[1].toFloat())) stats.add(unique.stats.times(cityInfo.population.population / unique.params[1].toFloat()))

View File

@ -741,7 +741,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction {
fun isStatRelated(stat: Stat): Boolean { fun isStatRelated(stat: Stat): Boolean {
if (get(stat) > 0) return true if (get(stat) > 0) return true
if (getStatPercentageBonuses(null)[stat] > 0) return true if (getStatPercentageBonuses(null)[stat] > 0) return true
if (uniqueObjects.any { it.placeholderText == "[] per [] population []" && it.stats[stat] > 0 }) return true if (uniqueObjects.any { it.isOfType(UniqueType.StatsPerPopulation) && it.stats[stat] > 0 }) return true
if (uniqueObjects.any { it.isOfType(UniqueType.StatsFromTiles) && it.stats[stat] > 0 }) return true if (uniqueObjects.any { it.isOfType(UniqueType.StatsFromTiles) && it.stats[stat] > 0 }) return true
return false return false
} }