Fixes incorrect default paramter for starting era (#5119)

This commit is contained in:
Xander Lenstra
2021-09-08 19:44:50 +02:00
committed by GitHub
parent a1f7721878
commit d1135f3d20
3 changed files with 2 additions and 4 deletions

View File

@ -25,7 +25,7 @@ class GameParameters { // Default values are the default new game
// By default, all victory types except Diplomacy as it is quite new
var victoryTypes: ArrayList<VictoryType> = arrayListOf(VictoryType.Cultural, VictoryType.Domination, VictoryType.Scientific)
var startingEra = "Ancient Era"
var startingEra = "Ancient era"
var isOnlineMultiplayer = false
var baseRuleset: BaseRuleset = BaseRuleset.Civ_V_Vanilla

View File

@ -294,8 +294,7 @@ class WorldScreenTopBar(val worldScreen: WorldScreen) : Table() {
private fun getEquivalentTurn(gameInfo: GameInfo): Int {
val totalTurns = 500f * gameInfo.gameParameters.gameSpeed.modifier
val startPercent = gameInfo.ruleSet.eras[gameInfo.gameParameters.startingEra]?.startPercent
if (startPercent == null) return gameInfo.turns
val startPercent = gameInfo.ruleSet.eras[gameInfo.gameParameters.startingEra]!!.startPercent
return gameInfo.turns + ((totalTurns * startPercent).toInt() / 100)
}
}