mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 06:16:37 -04:00
Can now choose construction to work on even when worker has no movement points, since it won't advance unless he does
This commit is contained in:
parent
98685ad7c0
commit
d0a59889c4
@ -277,9 +277,9 @@ object UnitActions {
|
||||
|
||||
if (unit.isEmbarked()) return
|
||||
|
||||
val canConstruct =unit.currentMovement > 0
|
||||
&& !tile.isCityCenter()
|
||||
&& unit.civInfo.gameInfo.ruleSet.tileImprovements.values.any { tile.canBuildImprovement(it, unit.civInfo) }
|
||||
val canConstruct = !tile.isCityCenter()
|
||||
&& unit.civInfo.gameInfo.ruleSet.tileImprovements.values
|
||||
.any { tile.canBuildImprovement(it, unit.civInfo) }
|
||||
actionList += UnitAction(
|
||||
type = UnitActionType.ConstructImprovement,
|
||||
isCurrentAction = unit.currentTile.hasImprovementInProgress(),
|
||||
@ -379,12 +379,14 @@ object UnitActions {
|
||||
}
|
||||
addGoldPerGreatPersonUsage(unit.civInfo)
|
||||
unit.destroy()
|
||||
}.takeIf { unit.currentMovement > 0f && !tile.isWater &&
|
||||
}.takeIf {
|
||||
unit.currentMovement > 0f && !tile.isWater &&
|
||||
!tile.isCityCenter() && !tile.isImpassible() &&
|
||||
tile.improvement != improvementName &&
|
||||
// citadel can be built only next to or within own borders
|
||||
(improvementName != Constants.citadel ||
|
||||
tile.neighbors.any { it.getOwner() == unit.civInfo })})
|
||||
tile.neighbors.any { it.getOwner() == unit.civInfo })
|
||||
})
|
||||
}
|
||||
return finalActions
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user