mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04: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
|
tileInfo.owningCity=null
|
||||||
}
|
}
|
||||||
|
|
||||||
fun AcquireOwnership(tileInfo: TileInfo){
|
fun takeOwnership(tileInfo: TileInfo){
|
||||||
takeOwnership(tileInfo)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun takeOwnership(tileInfo: TileInfo){
|
|
||||||
if(tileInfo.isCityCenter()) throw Exception("What?")
|
if(tileInfo.isCityCenter()) throw Exception("What?")
|
||||||
if(tileInfo.getCity()!=null) tileInfo.getCity()!!.expansion.relinquishOwnership(tileInfo)
|
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()
|
if(tile.getOwner()!=null && tile.getOwner()!!.isPlayerCivilization()
|
||||||
&& tile.arialDistanceTo(city.getCenterTile()) <= 3
|
&& tile.arialDistanceTo(city.getCenterTile()) <= 3
|
||||||
&& tile.neighbors.any{it.getCity()==city}){
|
&& tile.neighbors.any{it.getCity()==city}){
|
||||||
val transferTileButton = TextButton("Acquire".tr(),skin)
|
val acquireTileButton = TextButton("Acquire".tr(),skin)
|
||||||
transferTileButton.onClick { city.expansion.AcquireOwnership(tile); game.screen = CityScreen(city); dispose() }
|
acquireTileButton.onClick { city.expansion.takeOwnership(tile); game.screen = CityScreen(city); dispose() }
|
||||||
tileTable.add(transferTileButton)
|
tileTable.add(acquireTileButton)
|
||||||
}
|
}
|
||||||
|
|
||||||
tileTable.pack()
|
tileTable.pack()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user