Skip to content

Commit

Permalink
Actually I think I had it right the first time - avoid building if al…
Browse files Browse the repository at this point in the history
…l carriable units can already be carried now, NOT if carrier will have empty slots
  • Loading branch information
yairm210 committed Oct 14, 2024
1 parent 45fc67d commit 755d66e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/com/unciv/logic/automation/Automation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ object Automation {
val totalCarriableUnits =
civInfo.units.getCivUnits().count { it.matchesFilter(carryFilter) }
val totalCarryingSlots = civInfo.units.getCivUnits().sumOf { getCarryAmount(it) }
val currentUnitCarryingSlots = carryUnique.params[0].toInt()

return totalCarriableUnits < totalCarryingSlots + currentUnitCarryingSlots
return totalCarriableUnits < totalCarryingSlots
}

fun chooseMilitaryUnit(city: City, availableUnits: Sequence<BaseUnit>): String? {
Expand Down

0 comments on commit 755d66e

Please sign in to comment.