Fixed GameStarter adding gold to spectator Civilization on later eras when it shouldn't. (#9901)

This commit is contained in:
Oskar Niesen 2023-08-14 08:14:45 -05:00 committed by GitHub
parent c1da217ff6
commit 756431ee74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -227,7 +227,7 @@ object GameStarter {
val ruleSet = gameInfo.ruleset
val startingEra = gameInfo.gameParameters.startingEra
val era = ruleSet.eras[startingEra]!!
for (civInfo in gameInfo.civilizations.filter { !it.isBarbarian() }) {
for (civInfo in gameInfo.civilizations.filter { !it.isBarbarian() && !it.isSpectator() }) {
civInfo.addGold((era.startingGold * gameInfo.speed.goldCostModifier).toInt())
civInfo.policies.addCulture((era.startingCulture * gameInfo.speed.cultureCostModifier).toInt())
}