From ca2edb5158e116a612f579ca1a64910d3613688f Mon Sep 17 00:00:00 2001 From: Tensuko Date: Thu, 27 Nov 2025 17:53:53 +0100 Subject: [PATCH 1/5] Add settings --- config/MasterTranslations.xml | 8 ++++++++ config/VehicleSettingsSetup.xml | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/config/MasterTranslations.xml b/config/MasterTranslations.xml index a994e4a8c..e4f83e8ab 100644 --- a/config/MasterTranslations.xml +++ b/config/MasterTranslations.xml @@ -643,6 +643,14 @@ + + + + + + + + diff --git a/config/VehicleSettingsSetup.xml b/config/VehicleSettingsSetup.xml index ddf27c551..a83b9440f 100644 --- a/config/VehicleSettingsSetup.xml +++ b/config/VehicleSettingsSetup.xml @@ -27,8 +27,8 @@ - - + + From a699c7bf5b31c6cda2756d1736ba1651c86370f7 Mon Sep 17 00:00:00 2001 From: Tensuko Date: Thu, 27 Nov 2025 16:54:09 +0000 Subject: [PATCH 2/5] Updated translations --- translations/translation_br.xml | 2 ++ translations/translation_cs.xml | 2 ++ translations/translation_ct.xml | 2 ++ translations/translation_cz.xml | 2 ++ translations/translation_da.xml | 2 ++ translations/translation_de.xml | 2 ++ translations/translation_ea.xml | 2 ++ translations/translation_en.xml | 2 ++ translations/translation_es.xml | 2 ++ translations/translation_fc.xml | 2 ++ translations/translation_fi.xml | 2 ++ translations/translation_fr.xml | 2 ++ translations/translation_hu.xml | 2 ++ translations/translation_id.xml | 2 ++ translations/translation_it.xml | 2 ++ translations/translation_jp.xml | 2 ++ translations/translation_kr.xml | 2 ++ translations/translation_nl.xml | 2 ++ translations/translation_no.xml | 2 ++ translations/translation_pl.xml | 2 ++ translations/translation_pt.xml | 2 ++ translations/translation_ro.xml | 2 ++ translations/translation_ru.xml | 2 ++ translations/translation_sv.xml | 2 ++ translations/translation_tr.xml | 2 ++ translations/translation_uk.xml | 2 ++ translations/translation_vi.xml | 2 ++ 27 files changed, 54 insertions(+) diff --git a/translations/translation_br.xml b/translations/translation_br.xml index eb47d733d..9df72daa6 100644 --- a/translations/translation_br.xml +++ b/translations/translation_br.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_cs.xml b/translations/translation_cs.xml index bfa0e9f71..660507edb 100644 --- a/translations/translation_cs.xml +++ b/translations/translation_cs.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_ct.xml b/translations/translation_ct.xml index 8bac7dd6c..758651a30 100644 --- a/translations/translation_ct.xml +++ b/translations/translation_ct.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_cz.xml b/translations/translation_cz.xml index a9c3667b7..836924a73 100644 --- a/translations/translation_cz.xml +++ b/translations/translation_cz.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_da.xml b/translations/translation_da.xml index 638f21bd2..3a0d780b8 100644 --- a/translations/translation_da.xml +++ b/translations/translation_da.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_de.xml b/translations/translation_de.xml index d9027a1b3..c3b9c705a 100644 --- a/translations/translation_de.xml +++ b/translations/translation_de.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_ea.xml b/translations/translation_ea.xml index 76b9b1034..f47d4ee0b 100644 --- a/translations/translation_ea.xml +++ b/translations/translation_ea.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_en.xml b/translations/translation_en.xml index 066cc0fba..29744c145 100644 --- a/translations/translation_en.xml +++ b/translations/translation_en.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_es.xml b/translations/translation_es.xml index 07500b06b..aa3a6c799 100644 --- a/translations/translation_es.xml +++ b/translations/translation_es.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_fc.xml b/translations/translation_fc.xml index 4e7fb5498..0d234c391 100644 --- a/translations/translation_fc.xml +++ b/translations/translation_fc.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_fi.xml b/translations/translation_fi.xml index d628ad2a3..a68f1bc5b 100644 --- a/translations/translation_fi.xml +++ b/translations/translation_fi.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_fr.xml b/translations/translation_fr.xml index 4d927f4a9..231c759ac 100644 --- a/translations/translation_fr.xml +++ b/translations/translation_fr.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_hu.xml b/translations/translation_hu.xml index 264bb5e18..276a80e69 100644 --- a/translations/translation_hu.xml +++ b/translations/translation_hu.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_id.xml b/translations/translation_id.xml index 224a85e26..87e370724 100644 --- a/translations/translation_id.xml +++ b/translations/translation_id.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_it.xml b/translations/translation_it.xml index 659059ccb..5ec0c2b23 100644 --- a/translations/translation_it.xml +++ b/translations/translation_it.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_jp.xml b/translations/translation_jp.xml index 0ff706dc3..7f5866c71 100644 --- a/translations/translation_jp.xml +++ b/translations/translation_jp.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_kr.xml b/translations/translation_kr.xml index 1f0507327..4adf80487 100644 --- a/translations/translation_kr.xml +++ b/translations/translation_kr.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_nl.xml b/translations/translation_nl.xml index 5dcfeb99d..1d96a2e62 100644 --- a/translations/translation_nl.xml +++ b/translations/translation_nl.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_no.xml b/translations/translation_no.xml index 0985d4410..e440833df 100644 --- a/translations/translation_no.xml +++ b/translations/translation_no.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_pl.xml b/translations/translation_pl.xml index 4cec60563..b81c79d7c 100644 --- a/translations/translation_pl.xml +++ b/translations/translation_pl.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_pt.xml b/translations/translation_pt.xml index c61ee1ec3..02db1d7d1 100644 --- a/translations/translation_pt.xml +++ b/translations/translation_pt.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_ro.xml b/translations/translation_ro.xml index ea287c673..e7d580905 100644 --- a/translations/translation_ro.xml +++ b/translations/translation_ro.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_ru.xml b/translations/translation_ru.xml index ad4aa25de..193b1bd52 100644 --- a/translations/translation_ru.xml +++ b/translations/translation_ru.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_sv.xml b/translations/translation_sv.xml index 5cb2e404b..2d8ec05b3 100644 --- a/translations/translation_sv.xml +++ b/translations/translation_sv.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_tr.xml b/translations/translation_tr.xml index 4ac20fd11..dfa9d97d0 100644 --- a/translations/translation_tr.xml +++ b/translations/translation_tr.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_uk.xml b/translations/translation_uk.xml index c9473d94f..3b6ed43f6 100644 --- a/translations/translation_uk.xml +++ b/translations/translation_uk.xml @@ -201,6 +201,8 @@ + + diff --git a/translations/translation_vi.xml b/translations/translation_vi.xml index 66db3866a..9811ca928 100644 --- a/translations/translation_vi.xml +++ b/translations/translation_vi.xml @@ -201,6 +201,8 @@ + + From 179f1e182cadca8112a792d75f1003abfccb9da4 Mon Sep 17 00:00:00 2001 From: Peter Vaiko Date: Fri, 28 Nov 2025 06:38:56 -0500 Subject: [PATCH 3/5] feat: restart course at the first waypoint --- .../strategies/AIDriveStrategyFieldWorkCourse.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/ai/strategies/AIDriveStrategyFieldWorkCourse.lua b/scripts/ai/strategies/AIDriveStrategyFieldWorkCourse.lua index 28dfbf6be..dceee575c 100644 --- a/scripts/ai/strategies/AIDriveStrategyFieldWorkCourse.lua +++ b/scripts/ai/strategies/AIDriveStrategyFieldWorkCourse.lua @@ -445,7 +445,8 @@ end --- State changes ----------------------------------------------------------------------------------------------------------------------- function AIDriveStrategyFieldWorkCourse:finishFieldWork() - if self.settings.returnToStart:getValue() and self.fieldWorkCourse:startsWithHeadland() then + if (self.settings.returnToStart:getValue() and self.fieldWorkCourse:startsWithHeadland()) or + self.settings.restartCourseAtEnd:getValue() then self:debug('Fieldwork ended, returning to first waypoint.') self.vehicle:prepareForAIDriving() self:returnToStartAfterDone() @@ -530,9 +531,15 @@ function AIDriveStrategyFieldWorkCourse:onPathfindingDoneToReturnToStart(path) self:debug('Pathfinding to return to start finished with %d waypoints (%d ms)', #path, g_currentMission.time - (self.pathfindingStartedAt or 0)) local returnCourse = Course(self.vehicle, CpMathUtil.pointsToGameInPlace(path), true) - self.state = self.states.RETURNING_TO_START - self.waitingForPrepare:set(true, 10000) - self:startCourse(returnCourse, 1) + if self.settings.restartCourseAtEnd:getValue() then + self:debug('Returning to the first waypoint and then restarting the fieldwork course') + self:startAlignmentTurn(self.fieldWorkCourse, 1, returnCourse) + else + self:debug('Returning to the first waypoint and stopping there') + self.state = self.states.RETURNING_TO_START + self.waitingForPrepare:set(true, 10000) + self:startCourse(returnCourse, 1) + end else self:debug('No path found to return to fieldwork start after work is done (%d ms), stopping job', g_currentMission.time - (self.pathfindingStartedAt or 0)) From 34b6c9b34d0bc7a6719a27dc4318e3f5ea3f33ed Mon Sep 17 00:00:00 2001 From: Tensuko Date: Fri, 28 Nov 2025 18:02:05 +0100 Subject: [PATCH 4/5] Translation fix --- config/MasterTranslations.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/MasterTranslations.xml b/config/MasterTranslations.xml index e4f83e8ab..c9238e31d 100644 --- a/config/MasterTranslations.xml +++ b/config/MasterTranslations.xml @@ -648,7 +648,7 @@ - + From abd5a1a9f966e71cfc48ad386586122682dde074 Mon Sep 17 00:00:00 2001 From: Tensuko Date: Fri, 28 Nov 2025 17:02:20 +0000 Subject: [PATCH 5/5] Updated translations --- translations/translation_de.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/translation_de.xml b/translations/translation_de.xml index c3b9c705a..6d6a9364e 100644 --- a/translations/translation_de.xml +++ b/translations/translation_de.xml @@ -202,7 +202,7 @@ - +