mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-05 07:49:17 +07:00
Resolved #8088 - Single turn repair, repair turn inconsistencies
This commit is contained in:
@ -533,16 +533,8 @@ object UnitActions {
|
|||||||
return {
|
return {
|
||||||
unit.currentMovement = 0f
|
unit.currentMovement = 0f
|
||||||
val tile = unit.currentTile
|
val tile = unit.currentTile
|
||||||
val repairTurns = getRepairTurns(unit) - 1
|
tile.improvementInProgress = Constants.repair
|
||||||
if (repairTurns == 0) { // handle instant fix
|
tile.turnsToImprovement = getRepairTurns(unit)
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user