fix: alt foder staldene kan æde tæller som brugt på gården (v1.62.54)

This commit is contained in:
2026-10-07 00:44:33 +02:00
parent 34d88c7fbc
commit edfadac0ea
5 changed files with 23 additions and 2 deletions
+12
View File
@@ -1007,6 +1007,18 @@ function ADSources.getHusbandryConsumption(placeable)
return result
end
-- Foder stalden KAN æde (trugets varer), uanset om truget er tomt lige nu: {[fillType] = true}. Kun stalde med dyr.
-- Et tomt trug giver intet forbrug, og så blev TMR'en solgt før køerne nogensinde fik den (in-game 6/10).
function ADSources.getHusbandryAcceptedFoods(placeable)
local result = {}
local food = placeable ~= nil and placeable.spec_husbandryFood or nil
if food == nil or type(food.fillLevels) ~= "table" then return result end
local okCount, count = pcall(function() return placeable.getNumOfAnimals ~= nil and placeable:getNumOfAnimals() or 1 end)
if okCount and type(count) == "number" and count <= 0 then return result end
for fillType in pairs(food.fillLevels) do result[fillType] = true end
return result
end
-- Én stalds produktion (mælk, gødning, ...): {[fillType] = liter} kun for production > 0. Spillets rå rate
-- (pr. måned = én 24-timers dag) UDEN timeAdjustment — samme enhed som fabrikkernes cyklusser pr. måned i kæden.
function ADSources.getHusbandryOutputs(placeable)