mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-20 09:17:47 +07:00
Cities now only take ownership of _unowned_ tiles around them
This commit is contained in:
parent
9a72623499
commit
89a720f7b2
@ -21,8 +21,8 @@ android {
|
||||
applicationId "com.unciv.app"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 28
|
||||
versionCode 221
|
||||
versionName "2.14.2"
|
||||
versionCode 223
|
||||
versionName "2.14.3"
|
||||
}
|
||||
|
||||
// Had to add this crap for Travis to build, it wanted to sign the app
|
||||
|
@ -76,7 +76,9 @@ class CityExpansionManager {
|
||||
for(tile in cityInfo.tiles.map { cityInfo.tileMap[it] })
|
||||
relinquishOwnership(tile)
|
||||
|
||||
cityInfo.getCenterTile().getTilesInDistance(1).forEach { takeOwnership(it) }
|
||||
cityInfo.getCenterTile().getTilesInDistance(1)
|
||||
.filter { it.getCity()!=null } // can't take ownership of owned tiles
|
||||
.forEach { takeOwnership(it) }
|
||||
}
|
||||
|
||||
private fun addNewTileWithCulture() {
|
||||
@ -97,7 +99,8 @@ class CityExpansionManager {
|
||||
|
||||
fun takeOwnership(tileInfo: TileInfo){
|
||||
if(tileInfo.isCityCenter()) throw Exception("What?!")
|
||||
if(tileInfo.getCity()!=null) tileInfo.getCity()!!.expansion.relinquishOwnership(tileInfo)
|
||||
if(tileInfo.getCity()!=null)
|
||||
tileInfo.getCity()!!.expansion.relinquishOwnership(tileInfo)
|
||||
|
||||
cityInfo.tiles = cityInfo.tiles.withItem(tileInfo.position)
|
||||
tileInfo.owningCity = cityInfo
|
||||
|
@ -43,7 +43,7 @@ class ConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBaseScre
|
||||
else {
|
||||
pickProductionButton.color = Color.GRAY
|
||||
pickProductionButton.row()
|
||||
pickProductionButton.add(rejectionReason.toLabel().setFontColor(Color.RED))
|
||||
pickProductionButton.add(rejectionReason.toLabel().setFontColor(Color.RED)).colspan(pickProductionButton.columns)
|
||||
}
|
||||
|
||||
if(construction==cityScreen.city.cityConstructions.currentConstruction)
|
||||
|
Loading…
Reference in New Issue
Block a user