Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
6.01.00224 Combine always calls Autodrive when full #3792
Browse files Browse the repository at this point in the history
Hopefully got it right finally, combine now also calls AutoDrive when
waiting to unload after made a pocket or pull back
  • Loading branch information
pvaiko committed May 23, 2019
1 parent 02b227c commit b3a034e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion CombineAIDriver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -391,4 +391,14 @@ end

function CombineAIDriver:getFirstCourseplayer()
return self.vehicle.courseplayers and self.vehicle.courseplayers[1]
end
end

--- Interface for AutoDrive
---@return boolean true when the combine is waiting to be unloaded
function CombineAIDriver:isWaitingForUnload()
return self.state == self.states.ON_FIELDWORK_COURSE and
self.fieldworkState == self.states.UNLOAD_OR_REFILL_ON_FIELD and
(self.fieldWorkUnloadOrRefillState == self.states.WAITING_FOR_UNLOAD_OR_REFILL or
self.fieldWorkUnloadOrRefillState == self.states.WAITING_FOR_UNLOAD_IN_POCKET or
self.fieldWorkUnloadOrRefillState == self.states.WAITING_FOR_UNLOAD_AFTER_PULLED_BACK)
end
2 changes: 1 addition & 1 deletion UnloadableFieldworkAIDriver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function UnloadableFieldworkAIDriver:isAutoDriveWaitingForPipe()
end

--- Interface for AutoDrive
---@return boolean true when the combine is waiting to be unloaded
---@return boolean true when the tool is waiting to be unloaded
function UnloadableFieldworkAIDriver:isWaitingForUnload()
return self.state == self.states.ON_FIELDWORK_COURSE and
self.fieldworkState == self.states.UNLOAD_OR_REFILL_ON_FIELD and
Expand Down
2 changes: 1 addition & 1 deletion modDesc.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="40">
<version>6.01.00223</version>
<version>6.01.00224</version>
<author><![CDATA[Courseplay.devTeam]]></author>
<title>
<br>CoursePlay SIX</br>
Expand Down

0 comments on commit b3a034e

Please sign in to comment.