Skip to content

Commit

Permalink
Merge pull request #1311 from Courseplay/Issue-1310
Browse files Browse the repository at this point in the history
typo fix and might help with #1310
  • Loading branch information
schwiti6190 committed Apr 2, 2022
2 parents c49bf0f + c192e2e commit 4f39b3b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/specializations/CpAIFieldWorker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,10 @@ function CpAIFieldWorker:startCpAtFirstWp()
self:updateAIFieldWorkerImplementData()
if self:hasCpCourse() and self:getCanStartCpFieldWork() then
spec.cpJobStartAtFirstWp:applyCurrentState(self, g_currentMission, g_currentMission.player.farmId, true)

--- Applies the lane offset set in the hud, so ad can start with the correct lane offset.
spec.cpJobStartAtFirstWp:getCpJobParameters().laneOffset:setValue(spec.cpJob:getCpJobParameters().laneOffset:getValue())
spec.cpJobStartAtFirstWp:setValues()
local success = spec.cpJob:validate(false)
local success = spec.cpJobStartAtFirstWp:validate(false)
if success then
g_client:getServerConnection():sendEvent(AIJobStartRequestEvent.new(spec.cpJobStartAtFirstWp, self:getOwnerFarmId()))
return true
Expand All @@ -219,7 +218,7 @@ function CpAIFieldWorker:startCpAtLastWp()
if self:hasCpCourse() and self:getCanStartCpFieldWork() then
spec.cpJobStartAtLastWp:applyCurrentState(self, g_currentMission, g_currentMission.player.farmId, true)
spec.cpJobStartAtLastWp:setValues()
local success = spec.cpJob:validate(false)
local success = spec.cpJobStartAtLastWp:validate(false)
if success then
g_client:getServerConnection():sendEvent(AIJobStartRequestEvent.new(spec.cpJobStartAtLastWp, self:getOwnerFarmId()))
return true
Expand Down

0 comments on commit 4f39b3b

Please sign in to comment.