diff --git a/config/MasterTranslations.xml b/config/MasterTranslations.xml index a994e4a8..c9238e31 100644 --- a/config/MasterTranslations.xml +++ b/config/MasterTranslations.xml @@ -643,6 +643,14 @@ + + + + + + + + diff --git a/config/VehicleSettingsSetup.xml b/config/VehicleSettingsSetup.xml index ddf27c55..a83b9440 100644 --- a/config/VehicleSettingsSetup.xml +++ b/config/VehicleSettingsSetup.xml @@ -27,8 +27,8 @@ - - + + diff --git a/scripts/ai/strategies/AIDriveStrategyFieldWorkCourse.lua b/scripts/ai/strategies/AIDriveStrategyFieldWorkCourse.lua index 28dfbf6b..dceee575 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)) diff --git a/translations/translation_br.xml b/translations/translation_br.xml index eb47d733..9df72daa 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 bfa0e9f7..660507ed 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 8bac7dd6..758651a3 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 a9c3667b..836924a7 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 638f21bd..3a0d780b 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 d9027a1b..6d6a9364 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 76b9b103..f47d4ee0 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 066cc0fb..29744c14 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 07500b06..aa3a6c79 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 4e7fb549..0d234c39 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 d628ad2a..a68f1bc5 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 4d927f4a..231c759a 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 264bb5e1..276a80e6 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 224a85e2..87e37072 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 659059cc..5ec0c2b2 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 0ff706dc..7f5866c7 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 1f050732..4adf8048 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 5dcfeb99..1d96a2e6 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 0985d441..e440833d 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 4cec6056..b81c79d7 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 c61ee1ec..02db1d7d 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 ea287c67..e7d58090 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 ad4aa25d..193b1bd5 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 5cb2e404..2d8ec05b 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 4ac20fd1..dfa9d97d 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 c9473d94..3b6ed43f 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 66db3866..9811ca92 100644 --- a/translations/translation_vi.xml +++ b/translations/translation_vi.xml @@ -201,6 +201,8 @@ + +