fix: alt foder staldene kan æde tæller som brugt på gården (v1.62.54)
This commit is contained in:
@@ -144,6 +144,12 @@ end
|
||||
|
||||
-- Stald-foder: {[vare] = {staldnavn...}} for det truget æder nu (forbrug > 0) — til afhængighedstjekket.
|
||||
local function readBarnFood(data, placeable, nameOf)
|
||||
if ADSources.getHusbandryAcceptedFoods ~= nil then
|
||||
for index in pairs(ADSources.getHusbandryAcceptedFoods(placeable) or {}) do
|
||||
local name = nameOf(index)
|
||||
if name ~= nil then data.barnAccepts[name] = true end
|
||||
end
|
||||
end
|
||||
if ADSources.getHusbandryConsumption == nil then return end
|
||||
local barnName
|
||||
for index, perDay in pairs(ADSources.getHusbandryConsumption(placeable) or {}) do
|
||||
@@ -558,7 +564,7 @@ end
|
||||
-- ikke har nået alle marker.
|
||||
function ADChainData.collect(adEnv, farmId, byChain)
|
||||
local data = {recipes = {}, husbandry = {}, crops = {}, stock = {}, fields = {}, yields = {}, fruitFillIndex = {},
|
||||
usedFruits = {}, points = {}, fillTitles = {}, fillIndex = {}, placeables = {}, barnFood = {}, stockByFill = {}, rates = {}, fieldGoods = {}, fieldGoodCrops = {}, unswitchable = {}, harvesting = {}}
|
||||
usedFruits = {}, points = {}, fillTitles = {}, fillIndex = {}, placeables = {}, barnFood = {}, barnAccepts = {}, stockByFill = {}, rates = {}, fieldGoods = {}, fieldGoodCrops = {}, unswitchable = {}, harvesting = {}}
|
||||
local nameOf = nameResolver(data)
|
||||
data.priceOf = priceResolver(data)
|
||||
readPlaceables(data, farmId, byChain, nameOf)
|
||||
|
||||
Reference in New Issue
Block a user