mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 15:27:50 +07:00
Fixes incorrect default paramter for starting era (#5119)
This commit is contained in:
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user