mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-05 07:01:21 +07:00
Remove wraping method for transfering tile.
This commit is contained in:
parent
7c0179b268
commit
76ecec8511
@ -84,11 +84,7 @@ class CityExpansionManager {
|
||||
tileInfo.owningCity=null
|
||||
}
|
||||
|
||||
fun AcquireOwnership(tileInfo: TileInfo){
|
||||
takeOwnership(tileInfo)
|
||||
}
|
||||
|
||||
private fun takeOwnership(tileInfo: TileInfo){
|
||||
fun takeOwnership(tileInfo: TileInfo){
|
||||
if(tileInfo.isCityCenter()) throw Exception("What?")
|
||||
if(tileInfo.getCity()!=null) tileInfo.getCity()!!.expansion.relinquishOwnership(tileInfo)
|
||||
|
||||
|
@ -243,9 +243,9 @@ class CityScreen(internal val city: CityInfo) : CameraStageBaseScreen() {
|
||||
if(tile.getOwner()!=null && tile.getOwner()!!.isPlayerCivilization()
|
||||
&& tile.arialDistanceTo(city.getCenterTile()) <= 3
|
||||
&& tile.neighbors.any{it.getCity()==city}){
|
||||
val transferTileButton = TextButton("Acquire".tr(),skin)
|
||||
transferTileButton.onClick { city.expansion.AcquireOwnership(tile); game.screen = CityScreen(city); dispose() }
|
||||
tileTable.add(transferTileButton)
|
||||
val acquireTileButton = TextButton("Acquire".tr(),skin)
|
||||
acquireTileButton.onClick { city.expansion.takeOwnership(tile); game.screen = CityScreen(city); dispose() }
|
||||
tileTable.add(acquireTileButton)
|
||||
}
|
||||
|
||||
tileTable.pack()
|
||||
|
Loading…
Reference in New Issue
Block a user