Silly roadbuilding crash bugfix
This commit is contained in:
parent
c8285b9b0a
commit
f73d840a9d
3 changed files with 5 additions and 5 deletions
|
@ -568,7 +568,7 @@
|
|||
isWonder:true,
|
||||
percentStatBonus:{culture:50},
|
||||
uniques:["Free Social Policy","Can only be built in coastal cities"],
|
||||
requiredTech:"Flight"
|
||||
requiredTech:"Ecology"
|
||||
},
|
||||
{
|
||||
name:"Spaceship Factory",
|
||||
|
|
|
@ -21,8 +21,8 @@ android {
|
|||
applicationId "com.unciv.game"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 26
|
||||
versionCode 155
|
||||
versionName "2.9.8"
|
||||
versionCode 157
|
||||
versionName "2.9.9"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
|
|
|
@ -71,9 +71,9 @@ class WorkerAutomation(val unit: MapUnit) {
|
|||
else{
|
||||
val reachableTiles = roadableTiles.filter { unit.canMoveTo(it)&& unit.movementAlgs().canReach(it)}
|
||||
if(!reachableTiles.any()) continue
|
||||
tileToConstructRoadOn = roadableTiles.minBy { unit.movementAlgs().getShortestPath(it).size }!!
|
||||
tileToConstructRoadOn = reachableTiles.minBy { unit.movementAlgs().getShortestPath(it).size }!!
|
||||
unit.movementAlgs().headTowards(tileToConstructRoadOn)
|
||||
}
|
||||
unit.movementAlgs().headTowards(tileToConstructRoadOn)
|
||||
if(unit.currentMovement>0 && unit.currentTile==tileToConstructRoadOn
|
||||
&& unit.currentTile.improvementInProgress!="Road")
|
||||
tileToConstructRoadOn.startWorkingOnImprovement(GameBasics.TileImprovements["Road"]!!,unit.civInfo)
|
||||
|
|
Loading…
Reference in a new issue