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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user