Resolved #2137 - Fixed worker automation for snow tiles, AND settler automation fix

This commit is contained in:
Yair Morgenstern
2020-03-12 21:03:36 +02:00
parent c64b359fb5
commit d8d74b6873
3 changed files with 4 additions and 4 deletions

View File

@ -33,8 +33,8 @@ allprojects {
version = '1.0.1' version = '1.0.1'
ext { ext {
appName = "Unciv" appName = "Unciv"
appCodeNumber = 393 appCodeNumber = 394
appVersion = "3.6.7" appVersion = "3.6.7-patch1"
gdxVersion = '1.9.10' gdxVersion = '1.9.10'
roboVMVersion = '2.3.1' roboVMVersion = '2.3.1'

View File

@ -202,7 +202,7 @@ class WorkerAutomation(val unit: MapUnit) {
tile.baseTerrain == Constants.hill -> "Mine" tile.baseTerrain == Constants.hill -> "Mine"
tile.baseTerrain in listOf(Constants.grassland,Constants.desert,Constants.plains) -> "Farm" tile.baseTerrain in listOf(Constants.grassland,Constants.desert,Constants.plains) -> "Farm"
tile.baseTerrain == Constants.tundra -> "Trading post" tile.baseTerrain == Constants.tundra -> "Trading post"
else -> throw Exception("No improvement found for "+tile.baseTerrain) else -> null
} }
if (improvementString == null) return null if (improvementString == null) return null
return unit.civInfo.gameInfo.ruleSet.tileImprovements[improvementString]!! return unit.civInfo.gameInfo.ruleSet.tileImprovements[improvementString]!!

View File

@ -122,7 +122,7 @@ object UnitActions {
} }
fun getFoundCityAction(unit:MapUnit, tile: TileInfo): UnitAction? { fun getFoundCityAction(unit:MapUnit, tile: TileInfo): UnitAction? {
if (!unit.hasUnique("Founds a new city") || unit.isEmbarked()) return null if (!unit.hasUnique("Founds a new city") || tile.isWater) return null
return UnitAction( return UnitAction(
type = UnitActionType.FoundCity, type = UnitActionType.FoundCity,
uncivSound = UncivSound.Chimes, uncivSound = UncivSound.Chimes,