Actually I think I had it right the first time - avoid building if all carriable units can already be carried now, NOT if carrier will have empty slots

This commit is contained in:
yairm210
2024-10-14 11:12:51 +03:00
parent 45fc67df29
commit 755d66e085

View File

@ -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? {