fix bug with contest quests (#5554)

This commit is contained in:
SimonCeder 2021-10-25 18:08:43 +02:00 committed by GitHub
parent 741f2522b9
commit 6fdbc8a8da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -934,11 +934,11 @@ class CivilizationInfo {
fun addStat(stat: Stat, amount: Int) {
when (stat) {
Stat.Culture -> { policies.addCulture(amount)
totalCultureForContests += amount }
if(amount > 0) totalCultureForContests += amount }
Stat.Science -> tech.addScience(amount)
Stat.Gold -> addGold(amount)
Stat.Faith -> { religionManager.storedFaith += amount
totalFaithForContests += amount }
if(amount > 0) totalFaithForContests += amount }
else -> {}
// Food and Production wouldn't make sense to be added nationwide
// Happiness cannot be added as it is recalculated again, use a unique instead