mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
"Current construction is user set" saved between saves/loads - #875
This commit is contained in:
parent
ac664d97c9
commit
1aa703e69b
@ -28,6 +28,7 @@ class CityConstructions {
|
|||||||
toReturn.builtBuildings.addAll(builtBuildings)
|
toReturn.builtBuildings.addAll(builtBuildings)
|
||||||
toReturn.inProgressConstructions.putAll(inProgressConstructions)
|
toReturn.inProgressConstructions.putAll(inProgressConstructions)
|
||||||
toReturn.currentConstruction=currentConstruction
|
toReturn.currentConstruction=currentConstruction
|
||||||
|
toReturn.currentConstructionIsUserSet=currentConstructionIsUserSet
|
||||||
return toReturn
|
return toReturn
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,11 +45,16 @@ class CityScreenTileTable(val city: CityInfo): Table(){
|
|||||||
}
|
}
|
||||||
innerTable.add(statsTable).row()
|
innerTable.add(statsTable).row()
|
||||||
|
|
||||||
if(selectedTile.getOwner()==null && selectedTile.neighbors.any{it.getCity()==city}){
|
if(selectedTile.getOwner()==null && selectedTile.neighbors.any {it.getCity()==city}){
|
||||||
val goldCostOfTile = city.expansion.getGoldCostOfTile(selectedTile)
|
val goldCostOfTile = city.expansion.getGoldCostOfTile(selectedTile)
|
||||||
|
|
||||||
val buyTileButton = TextButton("Buy for [$goldCostOfTile] gold".tr(), CameraStageBaseScreen.skin)
|
val buyTileButton = TextButton("Buy for [$goldCostOfTile] gold".tr(), CameraStageBaseScreen.skin)
|
||||||
buyTileButton.onClick("coin") { city.expansion.buyTile(selectedTile); UnCivGame.Current.screen = CityScreen(city) }
|
buyTileButton.onClick("coin") {
|
||||||
|
city.expansion.buyTile(selectedTile)
|
||||||
|
UnCivGame.Current.screen = CityScreen(city)
|
||||||
|
}
|
||||||
if(goldCostOfTile>city.civInfo.gold) buyTileButton.disable()
|
if(goldCostOfTile>city.civInfo.gold) buyTileButton.disable()
|
||||||
|
|
||||||
innerTable.add(buyTileButton)
|
innerTable.add(buyTileButton)
|
||||||
}
|
}
|
||||||
if(city.canAcquireTile(selectedTile)){
|
if(city.canAcquireTile(selectedTile)){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user