diff --git a/android/build.gradle b/android/build.gradle index 6500d96499..8c36cb8449 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.game" minSdkVersion 14 targetSdkVersion 26 - versionCode 168 - versionName "2.10.7" + versionCode 169 + versionName "2.10.8" } buildTypes { release { diff --git a/core/src/com/unciv/logic/automation/WorkerAutomation.kt b/core/src/com/unciv/logic/automation/WorkerAutomation.kt index 5aabb99bb8..4727ad86e5 100644 --- a/core/src/com/unciv/logic/automation/WorkerAutomation.kt +++ b/core/src/com/unciv/logic/automation/WorkerAutomation.kt @@ -70,7 +70,7 @@ class WorkerAutomation(val unit: MapUnit) { if(unit.currentTile in roadableTiles) tileToConstructRoadOn = unit.currentTile else{ val reachableTiles = roadableTiles.filter { unit.canMoveTo(it)&& unit.movementAlgs().canReach(it)} - if(!reachableTiles.any()) continue + if(reachableTiles.isEmpty()) continue tileToConstructRoadOn = reachableTiles.minBy { unit.movementAlgs().getShortestPath(it).size }!! unit.movementAlgs().headTowards(tileToConstructRoadOn) } diff --git a/core/src/com/unciv/logic/trade/TradeLogic.kt b/core/src/com/unciv/logic/trade/TradeLogic.kt index d43afe2aba..e8fbf23e9e 100644 --- a/core/src/com/unciv/logic/trade/TradeLogic.kt +++ b/core/src/com/unciv/logic/trade/TradeLogic.kt @@ -36,9 +36,9 @@ class TradeLogic(val ourCivilization:CivilizationInfo, val otherCivilization: Ci offers.add(TradeOffer(city.name, TradeType.City, 0)) val otherCivsWeKnow = civInfo.diplomacy.values.map { it.otherCiv() } - .filter { it != otherCivilization && !it.isBarbarianCivilization() } + .filter { it != otherCivilization && !it.isBarbarianCivilization() && !it.isDefeated() } val civsWeKnowAndTheyDont = otherCivsWeKnow - .filter { !otherCivilization.diplomacy.containsKey(it.civName) } + .filter { !otherCivilization.diplomacy.containsKey(it.civName) && !it.isDefeated() } for(thirdCiv in civsWeKnowAndTheyDont){ offers.add(TradeOffer("Introduction to " + thirdCiv.civName, TradeType.Introduction, 0)) }