Skip to content

Commit

Permalink
Stop chopper only if it is harvesting #411
Browse files Browse the repository at this point in the history
  • Loading branch information
pvaiko committed Jan 8, 2022
1 parent 88b4c5e commit 93facd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/ai/AIDriveStrategyCombineCourse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,8 @@ function AIDriveStrategyCombineCourse:handleChopperPipe()
end
local dischargeNode = self.combine:getCurrentDischargeNode()
local targetObject, _ = self.combine:getDischargeTargetObject(dischargeNode)
if targetObject == nil or trailer == nil then
local fillLevel = self.vehicle:getFillUnitFillLevel(self.combine.fillUnitIndex)
if fillLevel > 0.01 and (targetObject == nil or trailer == nil) then
self:debugSparse('Chopper waiting for trailer, discharge node %s, target object %s, trailer %s',
tostring(dischargeNode), tostring(targetObject), tostring(trailer))
self:setMaxSpeed(0)
Expand Down

0 comments on commit 93facd0

Please sign in to comment.