fix(marker): vinhøster uden bredde får vinrækkens 3 m (v1.60.19.0)

This commit is contained in:
2026-09-29 23:40:08 +02:00
parent 8abcbcdcb8
commit a6506fea4e
3 changed files with 12 additions and 3 deletions
+10 -2
View File
@@ -391,11 +391,19 @@ local function courseplayWidth(vehicle)
return nil
end
-- Vinhøster uden AI-markører: bredden er vinrækken (3 m = Courseplays vin-gitter for druer).
ADCpBridge.VINE_ROW_WIDTH = 3
function ADCpBridge.widthOrVine(width, hasVineCutter)
if hasVineCutter and (width or 0) < 1 then return ADCpBridge.VINE_ROW_WIDTH end
return width
end
function ADCpBridge.getWorkWidth(vehicle)
local cpWidth = courseplayWidth(vehicle)
if cpWidth ~= nil then return cpWidth end
local best = 0
local best, hasVine = 0, false
for _, object in ipairs(collect(vehicle)) do
if object.spec_vineCutter ~= nil then hasVine = true end
local variable = variableWidth(object)
if variable ~= nil then
best = math.max(best, variable)
@@ -405,7 +413,7 @@ function ADCpBridge.getWorkWidth(vehicle)
if ok and type(width) == "number" and width > best then best = width end
end
end
return best
return ADCpBridge.widthOrVine(best, hasVine)
end
-- AutoDrive kører også som AI-job i FS25: aktiv AD er ikke Courseplay (in-game 29/9: Milk Store ved Cow Wait