fix(marker): vinhøster uden bredde får vinrækkens 3 m (v1.60.19.0)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user