mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-23 11:34:54 -04:00
Fixed crash when a worker tries to build a cached improvement that it can't build (#10854)
* Worker won't try to build the cached improvement that it can't build * Accounted for the repair case as well
This commit is contained in:
parent
1a0bdff019
commit
fa9d7e1ca7
@ -564,7 +564,9 @@ class WorkerAutomation(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// A better tile than this unit can build might have been stored in the cache
|
||||||
|
if (!rank.repairImprovment!! && (rank.bestImprovement == null ||
|
||||||
|
!unit.canBuildImprovement(rank.bestImprovement!!, tile))) return -100f
|
||||||
return rank.improvementPriority!!
|
return rank.improvementPriority!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user