mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 17:04:24 +07:00
Changes to provide Random Order of Civs in sims (#12656)
This commit is contained in:
parent
02fdeb1755
commit
fcdf6cba5f
@ -349,7 +349,12 @@ object GameStarter {
|
||||
.map { it.key }
|
||||
.filter { it in usedCivNames }
|
||||
|
||||
for (player in chosenPlayers) {
|
||||
val playersToAdd = if (newGameParameters.shufflePlayerOrder) {
|
||||
chosenPlayers.toMutableList().apply { shuffle() }
|
||||
} else {
|
||||
chosenPlayers
|
||||
}
|
||||
for (player in playersToAdd) {
|
||||
val civ = Civilization(player.chosenCiv)
|
||||
when (player.chosenCiv) {
|
||||
in usedMajorCivs, Constants.spectator -> {
|
||||
|
@ -31,6 +31,7 @@ class GameParameters : IsPartOfGameInfoSerialization { // Default values are the
|
||||
var nuclearWeaponsEnabled = true
|
||||
var espionageEnabled = false
|
||||
var noStartBias = false
|
||||
var shufflePlayerOrder = false
|
||||
|
||||
var victoryTypes: ArrayList<String> = arrayListOf()
|
||||
var startingEra = "Ancient era"
|
||||
@ -71,6 +72,7 @@ class GameParameters : IsPartOfGameInfoSerialization { // Default values are the
|
||||
parameters.nuclearWeaponsEnabled = nuclearWeaponsEnabled
|
||||
parameters.espionageEnabled = espionageEnabled
|
||||
parameters.noStartBias = noStartBias
|
||||
parameters.shufflePlayerOrder = shufflePlayerOrder
|
||||
parameters.victoryTypes = ArrayList(victoryTypes)
|
||||
parameters.startingEra = startingEra
|
||||
parameters.isOnlineMultiplayer = isOnlineMultiplayer
|
||||
|
@ -79,6 +79,7 @@ internal object ConsoleLauncher {
|
||||
numberOfCityStates = 0
|
||||
speed = Speed.DEFAULT
|
||||
noBarbarians = true
|
||||
shufflePlayerOrder = true
|
||||
players = ArrayList<Player>().apply {
|
||||
civilizations.forEach { add(Player(it)) }
|
||||
add(Player(Constants.spectator, PlayerType.Human))
|
||||
|
Loading…
Reference in New Issue
Block a user