diff --git a/core/src/com/unciv/models/ruleset/Speed.kt b/core/src/com/unciv/models/ruleset/Speed.kt index 949e2a815a..1f3c5aaefa 100644 --- a/core/src/com/unciv/models/ruleset/Speed.kt +++ b/core/src/com/unciv/models/ruleset/Speed.kt @@ -32,14 +32,19 @@ class Speed : RulesetObject() { } val statCostModifiers: HashMap by lazy { - HashMap().apply { - this[Stat.Faith] = 1f; - this[Stat.Production] = productionCostModifier; - this[Stat.Gold] = goldCostModifier; - this[Stat.Science] = scienceCostModifier; - this[Stat.Faith] = faithCostModifier; - this[Stat.Happiness] = 1f; + val map = HashMap() + for (stat in Stat.values()) { + val modifier = when (stat) { + Stat.Production -> productionCostModifier + Stat.Gold -> goldCostModifier + Stat.Science -> scienceCostModifier + Stat.Faith -> faithCostModifier + else -> 1f + } + map[stat] = modifier } + + map } companion object {