mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04:00
Resolved #954 - settlers can't settle cities inside other civ's territory
LibGDX, Kotlin and Gradle upgrade
This commit is contained in:
parent
11d7ac714c
commit
0b7f5f5cff
@ -1,6 +1,6 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
|
|
||||||
ext.kotlinVersion = '1.3.11'
|
ext.kotlinVersion = '1.3.41'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||||
@ -16,7 +16,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
|
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
|
||||||
classpath 'com.android.tools.build:gradle:3.4.1'
|
classpath 'com.android.tools.build:gradle:3.4.2'
|
||||||
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1'
|
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ allprojects {
|
|||||||
version = '1.0.1'
|
version = '1.0.1'
|
||||||
ext {
|
ext {
|
||||||
appName = "unciv-game"
|
appName = "unciv-game"
|
||||||
gdxVersion = '1.9.9'
|
gdxVersion = '1.9.10'
|
||||||
roboVMVersion = '2.3.1'
|
roboVMVersion = '2.3.1'
|
||||||
box2DLightsVersion = '1.4'
|
box2DLightsVersion = '1.4'
|
||||||
ashleyVersion = '1.7.0'
|
ashleyVersion = '1.7.0'
|
||||||
|
@ -100,7 +100,10 @@ class SpecificUnitAutomation{
|
|||||||
.associateBy ( {it},{ Automation().rankTile(it,unit.civInfo) })
|
.associateBy ( {it},{ Automation().rankTile(it,unit.civInfo) })
|
||||||
|
|
||||||
val possibleCityLocations = unit.getTile().getTilesInDistance(5)
|
val possibleCityLocations = unit.getTile().getTilesInDistance(5)
|
||||||
.filter { (unit.movement.canMoveTo(it) || unit.currentTile==it) && it !in tilesNearCities && it.isLand }
|
.filter { val tileOwner=it.getOwner()
|
||||||
|
(tileOwner==null || tileOwner==unit.civInfo) && // don't allow settler to settle inside other civ's territory
|
||||||
|
(unit.movement.canMoveTo(it) || unit.currentTile==it)
|
||||||
|
&& it !in tilesNearCities && it.isLand }
|
||||||
|
|
||||||
val bestCityLocation: TileInfo? = possibleCityLocations
|
val bestCityLocation: TileInfo? = possibleCityLocations
|
||||||
.asSequence()
|
.asSequence()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user