fix(marker): ensilage går til gæringssilo (produktion skår -> SILAGE) før almindelig silo; hø aldrig i gæringssilo (v1.25.0.0)

In-game 25/9: læssevognen aflæssede græs i en Farma-silo i stedet for en ensilage-silo.
This commit is contained in:
2026-09-25 23:43:51 +02:00
parent cf7a2a51e5
commit 7f83cc4d28
10 changed files with 86 additions and 9 deletions
@@ -129,11 +129,17 @@ function SmartPickupFrame:fillFieldStoreRows(adEnv, info, field)
local fieldSilos = {}
for _, building in ipairs(ADFields.fieldSilos(adEnv, farmId, info)) do fieldSilos[building.id] = building end
local count = 0
local fermenterIds = {}
if field.plan.product ~= "hay" then
for _, building in ipairs(ADFieldJobs.getFermenters(adEnv, farmId, fillType, info.x, info.z)) do fermenterIds[building.id] = true end
end
for _, building in ipairs(ADBuildings.list(adEnv, farmId)) do
if building.kind == "silo" and (chosen[building.id] or ADRunsController.canStoreAt(adEnv, building, {{fillType = fillType, isPallet = false}})) then
local isSilo = building.kind == "silo" and ADRunsController.canStoreAt(adEnv, building, {{fillType = fillType, isPallet = false}})
if chosen[building.id] or isSilo or fermenterIds[building.id] then
count = count + 1
local row = self:addRow(self.ingredientPrefab, {kind = "fieldStore", buildingId = building.id})
local suffix = fieldSilos[building.id] ~= nil and (" (" .. i18n:getText("spu_field_fieldSilo") .. ")") or ""
if fermenterIds[building.id] then suffix = suffix .. " (" .. i18n:getText("spu_field_fermenter") .. ")" end
row:getDescendantByName("title"):setText(" " .. tostring(building.name) .. suffix)
row:getDescendantByName("option"):setState(chosen[building.id] and SmartPickupFrame.STATE_ON or SmartPickupFrame.STATE_OFF, false)
end
@@ -141,7 +147,7 @@ function SmartPickupFrame:fillFieldStoreRows(adEnv, info, field)
if count == 0 then
self:addTextRow(" " .. i18n:getText("spu_field_noStore"))
elseif #field.plan.storeBuildingIds == 0 then
self:addTextRow(" " .. i18n:getText("spu_field_storeAuto"))
self:addTextRow(" " .. i18n:getText(field.plan.product == "hay" and "spu_field_storeAuto" or "spu_field_storeAutoSilage"))
end
-- marksiloer skal tømmes hjem af et udkørselsflow
for id, building in pairs(fieldSilos) do