From 15b7149a287fd15080b68ca99791a17b8bd8e175 Mon Sep 17 00:00:00 2001 From: Peter Vaiko Date: Sun, 7 Dec 2025 07:52:46 -0500 Subject: [PATCH] fix: start job without entering vehicle #1126 --- scripts/ai/jobs/CpAIJob.lua | 2 +- scripts/ai/jobs/CpAIJobFieldWork.lua | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/ai/jobs/CpAIJob.lua b/scripts/ai/jobs/CpAIJob.lua index 72fa0eca9..7f4138332 100644 --- a/scripts/ai/jobs/CpAIJob.lua +++ b/scripts/ai/jobs/CpAIJob.lua @@ -263,7 +263,7 @@ function CpAIJob:detectFieldBoundary() return false, false, g_i18n:getText("CP_error_not_on_field") end if vehicle:cpIsFieldBoundaryDetectionRunning() then - return false, false, g_i18n:getText("CP_error_field_detection_still_running") + return false, true, g_i18n:getText("CP_error_field_detection_still_running") end local x, z = vehicle:cpGetFieldPosition() if x == tx and z == tz then diff --git a/scripts/ai/jobs/CpAIJobFieldWork.lua b/scripts/ai/jobs/CpAIJobFieldWork.lua index 91c1e86c7..cdebae6ab 100644 --- a/scripts/ai/jobs/CpAIJobFieldWork.lua +++ b/scripts/ai/jobs/CpAIJobFieldWork.lua @@ -138,10 +138,11 @@ function CpAIJobFieldWork:validate(farmId) end local vehicle = self.vehicleParameter:getVehicle() - --- Only check the valid field position in the in game menu. + --- Only check the valid field boundary in the in game menu. if not self.isDirectStart then isValid, isRunning, errorMessage = self:detectFieldBoundary() - if not isValid then + if not isValid and not isRunning then + self:debug("no boundary and no field detection is running"); return isValid, errorMessage end self.cpJobParameters:validateSettings()