mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
new selected constructions will be inserted before infinite output (#3073)
perpetual constructions will replace each other in queue Spectators no longer can sell buildings Spectators no longer can rename cities
This commit is contained in:
parent
6c2d597c39
commit
d89526b8b8
@ -396,9 +396,15 @@ class CityConstructions {
|
||||
if (isQueueFull()) return
|
||||
if (currentConstructionFromQueue == "" || currentConstructionFromQueue == "Nothing") {
|
||||
currentConstructionFromQueue = constructionName
|
||||
currentConstructionIsUserSet = true
|
||||
} else if (getConstruction(constructionQueue.last()) is PerpetualConstruction) {
|
||||
if (getConstruction(constructionName) is PerpetualConstruction) { // perpetual constructions will replace each other
|
||||
constructionQueue.removeAt(constructionQueue.size - 1)
|
||||
constructionQueue.add(constructionName)
|
||||
} else
|
||||
constructionQueue.add(constructionQueue.size - 1, constructionName) // insert new construction before perpetual one
|
||||
} else
|
||||
constructionQueue.add(constructionName)
|
||||
currentConstructionIsUserSet = true
|
||||
}
|
||||
|
||||
/** If this was done automatically, we should automatically try to choose a new construction and treat it as such */
|
||||
|
@ -115,7 +115,7 @@ class CityInfoTable(private val cityScreen: CityScreen) : Table(CameraStageBaseS
|
||||
}).open()
|
||||
}
|
||||
if ((cityScreen.city.hasSoldBuildingThisTurn && !cityScreen.city.civInfo.gameInfo.gameParameters.godMode) || cityScreen.city.isPuppet
|
||||
|| !UncivGame.Current.worldScreen.isPlayersTurn)
|
||||
|| !UncivGame.Current.worldScreen.isPlayersTurn || !cityScreen.canChangeState)
|
||||
sellBuildingButton.disable()
|
||||
}
|
||||
wonderDetailsTable.addSeparator()
|
||||
|
@ -47,7 +47,7 @@ class CityScreenCityPickerTable(val cityScreen: CityScreen) : Table(){
|
||||
}
|
||||
|
||||
val currentCityLabel = city.name.toLabel(fontSize = 30, fontColor = civInfo.nation.getInnerColor())
|
||||
currentCityLabel.onClick {
|
||||
if (cityScreen.canChangeState) currentCityLabel.onClick {
|
||||
val editCityNamePopup = Popup(cityScreen)
|
||||
val textArea = TextField(city.name, CameraStageBaseScreen.skin)
|
||||
textArea.alignment = Align.center
|
||||
|
Loading…
x
Reference in New Issue
Block a user