Resolved #2723 - resource-specific improvement bonuses are *in addition to* the regular improvement bonuses, and not instead.

This commit is contained in:
Yair Morgenstern 2020-06-14 20:52:00 +03:00
parent c3da044c43
commit 9b37f0a907

View File

@ -253,11 +253,9 @@ open class TileInfo {
}
fun getImprovementStats(improvement: TileImprovement, observingCiv: CivilizationInfo, city: CityInfo?): Stats {
val stats =
if (hasViewableResource(observingCiv) && getTileResource().improvement == improvement.name)
getTileResource().improvementStats!!.clone() // resource-specific improvement
else
improvement.clone() // basic improvement
val stats = improvement.clone()
if (hasViewableResource(observingCiv) && getTileResource().improvement == improvement.name)
stats.add(getTileResource().improvementStats!!.clone()) // resource-specific improvement
if (improvement.improvingTech != null && observingCiv.tech.isResearched(improvement.improvingTech!!)) stats.add(improvement.improvingTechStats!!) // eg Chemistry for mines
if (improvement.name == "Trading post" && city != null