mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 13:27:22 -04:00
Fix crash on loading a save where Machu Picchu is built (#6402)
This commit is contained in:
parent
d001516b8e
commit
59dd696c3f
@ -92,7 +92,7 @@ class CityStats(val cityInfo: CityInfo) {
|
|||||||
stats.add(unique.stats)
|
stats.add(unique.stats)
|
||||||
val percentageStats = Stats()
|
val percentageStats = Stats()
|
||||||
for (unique in cityInfo.getMatchingUniques(UniqueType.StatPercentFromTradeRoutes))
|
for (unique in cityInfo.getMatchingUniques(UniqueType.StatPercentFromTradeRoutes))
|
||||||
percentageStats[Stat.valueOf(unique.params[0])] += unique.params[0].toFloat()
|
percentageStats[Stat.valueOf(unique.params[1])] += unique.params[0].toFloat()
|
||||||
// Deprecated as of 3.19.19
|
// Deprecated as of 3.19.19
|
||||||
if (civInfo.hasUnique(UniqueType.GoldBonusFromTradeRoutesDeprecated)) percentageStats[Stat.Gold] += 25f // Machu Picchu speciality
|
if (civInfo.hasUnique(UniqueType.GoldBonusFromTradeRoutesDeprecated)) percentageStats[Stat.Gold] += 25f // Machu Picchu speciality
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user