fix: alle foderfabrikker begrænses (også til 0); lige gode foder efter truget (v1.62.110)

This commit is contained in:
2026-10-08 20:50:36 +02:00
parent e636f990ac
commit 2988566e3c
5 changed files with 32 additions and 3 deletions
+2 -1
View File
@@ -1160,7 +1160,8 @@ function ADSources.getHusbandryDemand(placeable)
pcall(function()
local food, straw = placeable.spec_husbandryFood, placeable.spec_husbandryStraw
if food ~= nil and (food.litersPerHour or 0) > 0 then
for fillType, liters in pairs(ADStorageStats.splitTroughConsumption(food.litersPerHour * 24, {}, getFoodWeights(placeable))) do
local split = ADStorageStats.splitBestFood or function(perDay, _, weights) return ADStorageStats.splitTroughConsumption(perDay, {}, weights) end
for fillType, liters in pairs(split(food.litersPerHour * 24, food.fillLevels, getFoodWeights(placeable))) do
result[fillType] = (result[fillType] or 0) + liters
end
end