fix: stald-silo fyldes kun med staldens bedste foder (TMR til køerne) — 1.62.149
This commit is contained in:
@@ -776,7 +776,10 @@ function ADSmartPickup.getStableSiloFillTypes(adEnv, stations, farmId)
|
||||
if husbandry ~= nil and husbandry.rootNode ~= nil then
|
||||
local okH, hx, _, hz = pcall(getWorldTranslation, husbandry.rootNode)
|
||||
if okH and math.sqrt((hx - sx) ^ 2 + (hz - sz) ^ 2) <= range then
|
||||
for fillType in pairs(getHusbandryFoodFillTypes(husbandry) or {}) do result[fillType], any = true, true end
|
||||
-- serielt foder (køer): kun det bedste (TMR); parallelt foder (høns) æder alle grupper
|
||||
local foods = getHusbandryFoodFillTypes(husbandry) or {}
|
||||
if getParallelFoodGroups(husbandry) == nil then foods = ADSupplyPlanner.bestFoodOnly(foods) end
|
||||
for fillType in pairs(foods) do result[fillType], any = true, true end
|
||||
if strawIndex ~= nil and husbandry.spec_husbandryStraw ~= nil then result[strawIndex], any = true, true end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user