mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
4.6.1-patch2
Fixed multiplayer games not starting because player ID was being lost on the way @SomeTroglodyte
This commit is contained in:
parent
fd9284f8a3
commit
26d16fc1cc
@ -3,8 +3,8 @@ package com.unciv.build
|
||||
object BuildConfig {
|
||||
const val kotlinVersion = "1.8.0"
|
||||
const val appName = "Unciv"
|
||||
const val appCodeNumber = 847
|
||||
const val appVersion = "4.6.1-patch1"
|
||||
const val appCodeNumber = 848
|
||||
const val appVersion = "4.6.1-patch2"
|
||||
|
||||
const val gdxVersion = "1.11.0"
|
||||
const val roboVMVersion = "2.3.1"
|
||||
|
@ -531,7 +531,7 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci
|
||||
|
||||
companion object {
|
||||
//region AUTOMATICALLY GENERATED VERSION DATA - DO NOT CHANGE THIS REGION, INCLUDING THIS COMMENT
|
||||
val VERSION = Version("4.6.1-patch1", 847)
|
||||
val VERSION = Version("4.6.1-patch2", 848)
|
||||
//endregion
|
||||
|
||||
lateinit var Current: UncivGame
|
||||
|
@ -23,7 +23,6 @@ import com.unciv.models.stats.Stats
|
||||
import com.unciv.models.translations.equalsPlaceholderText
|
||||
import com.unciv.models.translations.getPlaceholderParameters
|
||||
import com.unciv.utils.debug
|
||||
import kotlin.collections.ArrayDeque
|
||||
|
||||
object GameStarter {
|
||||
// temporary instrumentation while tuning/debugging
|
||||
@ -293,8 +292,8 @@ object GameStarter {
|
||||
// Resolve random players
|
||||
when {
|
||||
it.chosenCiv != Constants.random -> it
|
||||
presetRandomNationsPool.isNotEmpty() -> Player(presetRandomNationsPool.removeLast(), it.playerType)
|
||||
randomNationsPool.isNotEmpty() -> Player(randomNationsPool.removeLast(), it.playerType)
|
||||
presetRandomNationsPool.isNotEmpty() -> Player(presetRandomNationsPool.removeLast(), it.playerType, it.playerId)
|
||||
randomNationsPool.isNotEmpty() -> Player(randomNationsPool.removeLast(), it.playerType, it.playerId)
|
||||
else -> null
|
||||
}
|
||||
}.toCollection(chosenPlayers)
|
||||
|
@ -6,7 +6,6 @@ import com.unciv.logic.civilization.PlayerType
|
||||
|
||||
class Player(
|
||||
var chosenCiv: String = Constants.random,
|
||||
var playerType: PlayerType = PlayerType.AI
|
||||
) : IsPartOfGameInfoSerialization {
|
||||
var playerId = ""
|
||||
}
|
||||
var playerType: PlayerType = PlayerType.AI,
|
||||
var playerId:String = ""
|
||||
) : IsPartOfGameInfoSerialization
|
||||
|
@ -23,6 +23,7 @@ import com.unciv.models.ruleset.unit.BaseUnit
|
||||
import com.unciv.models.stats.Stat
|
||||
import com.unciv.models.translations.tr
|
||||
import com.unciv.ui.audio.SoundPlayer
|
||||
import com.unciv.ui.components.ColorMarkupLabel
|
||||
import com.unciv.ui.components.ExpanderTab
|
||||
import com.unciv.ui.components.UncivTooltip.Companion.addTooltip
|
||||
import com.unciv.ui.components.extensions.addBorder
|
||||
@ -401,7 +402,7 @@ class CityConstructionsTable(private val cityScreen: CityScreen) {
|
||||
for (unique in constructionButtonDTO.construction.getMatchingUniquesNotConflicting(UniqueType.CostsResources)){
|
||||
val color = if (constructionButtonDTO.rejectionReason?.type == RejectionReasonType.ConsumesResources)
|
||||
Color.RED else Color.WHITE
|
||||
resourceTable.add(unique.params[0].toLabel(fontColor = color)).expandX().left().padLeft(5f)
|
||||
resourceTable.add(ColorMarkupLabel(unique.params[0], color)).expandX().left().padLeft(5f)
|
||||
resourceTable.add(ImageGetter.getResourcePortrait(unique.params[1], 15f)).padBottom(1f)
|
||||
}
|
||||
constructionTable.add(resourceTable).expandX().left()
|
||||
@ -425,8 +426,9 @@ class CityConstructionsTable(private val cityScreen: CityScreen) {
|
||||
pickConstructionButton.color.a = 0.9f
|
||||
icon.color.a = 0.5f
|
||||
if (constructionButtonDTO.rejectionReason.type != RejectionReasonType.ConsumesResources) {
|
||||
pickConstructionButton.add(constructionButtonDTO.rejectionReason.errorMessage
|
||||
.toLabel(Color.RED).apply { wrap = true })
|
||||
pickConstructionButton.add(
|
||||
ColorMarkupLabel(constructionButtonDTO.rejectionReason.errorMessage, Color.RED)
|
||||
.apply { wrap = true })
|
||||
.colspan(pickConstructionButton.columns)
|
||||
.width(cityScreen.stage.width/4).fillX().left().padTop(2f)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user