Resolved #8088 - Single turn repair, repair turn inconsistencies

This commit is contained in:
Yair Morgenstern
2022-12-05 19:03:17 +02:00
parent 454f999948
commit 11e26c74ad

View File

@ -533,16 +533,8 @@ object UnitActions {
return {
unit.currentMovement = 0f
val tile = unit.currentTile
val repairTurns = getRepairTurns(unit) - 1
if (repairTurns == 0) { // handle instant fix
tile.setRepaired()
unit.civInfo.updateDetailedCivResources() // maybe just restored a resource
unit.civInfo.transients()
.updateCitiesConnectedToCapital() // check for connections to capital
} else {
tile.improvementInProgress = Constants.repair
tile.turnsToImprovement = repairTurns
}
tile.improvementInProgress = Constants.repair
tile.turnsToImprovement = getRepairTurns(unit)
}
}