fix(marker): vinhøster uden bredde får vinrækkens 3 m (v1.60.19.0)
This commit is contained in:
@@ -8,6 +8,7 @@ står i [docs/BRUGERMANUAL.md](docs/BRUGERMANUAL.md) (dansk) og [docs/USER_MANUA
|
|||||||
|
|
||||||
## 1.60 — "Kræver handling" → flow, menuplacering, flow-vogne i guiden
|
## 1.60 — "Kræver handling" → flow, menuplacering, flow-vogne i guiden
|
||||||
|
|
||||||
|
- **1.60.19** Vinhøster uden kendt arbejdsbredde får vinrækkens 3 m (før "bredde ukendt", og marken blev ikke startet).
|
||||||
- **1.60.18** Vinhøsterens afgrøde læses fra `inputFruitTypeIndex` (feltnavnet i FS25).
|
- **1.60.18** Vinhøsterens afgrøde læses fra `inputFruitTypeIndex` (feltnavnet i FS25).
|
||||||
- **1.60.17** Vinhøstere (fx Grégoire GL86) genkendes som høstere af den afgrøde, de er konfigureret til
|
- **1.60.17** Vinhøstere (fx Grégoire GL86) genkendes som høstere af den afgrøde, de er konfigureret til
|
||||||
(spec_vineCutter). Før fik vinmarker "ingen kan" (in-game: F22 hvide druer).
|
(spec_vineCutter). Før fik vinmarker "ingen kan" (in-game: F22 hvide druer).
|
||||||
|
|||||||
@@ -391,11 +391,19 @@ local function courseplayWidth(vehicle)
|
|||||||
return nil
|
return nil
|
||||||
end
|
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)
|
function ADCpBridge.getWorkWidth(vehicle)
|
||||||
local cpWidth = courseplayWidth(vehicle)
|
local cpWidth = courseplayWidth(vehicle)
|
||||||
if cpWidth ~= nil then return cpWidth end
|
if cpWidth ~= nil then return cpWidth end
|
||||||
local best = 0
|
local best, hasVine = 0, false
|
||||||
for _, object in ipairs(collect(vehicle)) do
|
for _, object in ipairs(collect(vehicle)) do
|
||||||
|
if object.spec_vineCutter ~= nil then hasVine = true end
|
||||||
local variable = variableWidth(object)
|
local variable = variableWidth(object)
|
||||||
if variable ~= nil then
|
if variable ~= nil then
|
||||||
best = math.max(best, variable)
|
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
|
if ok and type(width) == "number" and width > best then best = width end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return best
|
return ADCpBridge.widthOrVine(best, hasVine)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- AutoDrive kører også som AI-job i FS25: aktiv AD er ikke Courseplay (in-game 29/9: Milk Store ved Cow Wait
|
-- AutoDrive kører også som AI-job i FS25: aktiv AD er ikke Courseplay (in-game 29/9: Milk Store ved Cow Wait
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||||
<modDesc descVersion="107">
|
<modDesc descVersion="107">
|
||||||
<author>masterdraco</author>
|
<author>masterdraco</author>
|
||||||
<version>1.60.18.0</version>
|
<version>1.60.19.0</version>
|
||||||
<title>
|
<title>
|
||||||
<en>AD Smart Pickup</en>
|
<en>AD Smart Pickup</en>
|
||||||
</title>
|
</title>
|
||||||
|
|||||||
Reference in New Issue
Block a user