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
+17
View File
@@ -178,6 +178,23 @@ function ADFieldModel.collectorOffset(ownOffset, windrowOffset)
return math.max(-ADFieldModel.CP_MAX_TOOL_OFFSET, math.min(ADFieldModel.CP_MAX_TOOL_OFFSET, offset))
end
-- Gæringssilo: en produktion der har markens skår som input og ensilage som output (FermentingSiloPack,
-- GrassSilageSilo m.fl. er produktioner, ikke siloer). productions = {{inputs = {{type}}, outputs = {{type}}}}.
function ADFieldModel.isFermenter(productions, windrowFillType, silageFillType)
if silageFillType == nil then return false end
for _, production in ipairs(productions or {}) do
local takesWindrow, makesSilage = false, false
for _, input in ipairs(production.inputs or {}) do
if input.type == windrowFillType then takesWindrow = true end
end
for _, output in ipairs(production.outputs or {}) do
if output.type == silageFillType then makesSilage = true end
end
if takesWindrow and makesSilage then return true end
end
return false
end
function ADFieldModel.toRecord(field)
return {
id = field.id, stage = field.stage, mode = field.plan.mode, product = field.plan.product,