mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-31 18:04:55 +07:00
Resolved #1927- changing new game parameters and exiting the new game screen doesn't change the current game's parameters
This commit is contained in:
parent
5117a9faa4
commit
efe200442a
@ -21,4 +21,19 @@ class GameParameters { // Default values are the default new game
|
||||
|
||||
var isOnlineMultiplayer = false
|
||||
var mods = HashSet<String>()
|
||||
|
||||
fun clone(): GameParameters {
|
||||
val parameters=GameParameters()
|
||||
parameters.difficulty=difficulty
|
||||
parameters.gameSpeed=gameSpeed
|
||||
parameters.players= ArrayList(players)
|
||||
parameters.numberOfCityStates=numberOfCityStates
|
||||
parameters.noBarbarians=noBarbarians
|
||||
parameters.oneCityChallenge=oneCityChallenge
|
||||
parameters.victoryTypes= ArrayList(victoryTypes)
|
||||
parameters.startingEra=startingEra
|
||||
parameters.isOnlineMultiplayer=isOnlineMultiplayer
|
||||
parameters.mods= HashSet(mods)
|
||||
return parameters
|
||||
}
|
||||
}
|
@ -13,17 +13,17 @@ import com.unciv.logic.civilization.PlayerType
|
||||
import com.unciv.models.ruleset.RulesetCache
|
||||
import com.unciv.models.translations.tr
|
||||
import com.unciv.ui.pickerscreens.PickerScreen
|
||||
import com.unciv.ui.utils.Popup
|
||||
import com.unciv.ui.utils.disable
|
||||
import com.unciv.ui.utils.enable
|
||||
import com.unciv.ui.utils.onClick
|
||||
import com.unciv.ui.worldscreen.mainmenu.OnlineMultiplayer
|
||||
import com.unciv.ui.utils.Popup
|
||||
import java.util.*
|
||||
import kotlin.concurrent.thread
|
||||
|
||||
class NewGameScreen: PickerScreen(){
|
||||
|
||||
val newGameParameters= UncivGame.Current.gameInfo.gameParameters
|
||||
val newGameParameters= UncivGame.Current.gameInfo.gameParameters.clone()
|
||||
val mapParameters = UncivGame.Current.gameInfo.tileMap.mapParameters
|
||||
val ruleset = RulesetCache.getComplexRuleset(newGameParameters.mods)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user