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

Commit

Permalink
6.01.00164 Do not unload baler/wrapper during turn #3525
Browse files Browse the repository at this point in the history
  • Loading branch information
pvaiko committed Apr 6, 2019
1 parent 152a5f7 commit 8443c3c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions BaleWrapperAIDriver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ function BaleWrapperAIDriver:init(vehicle)
end

function BaleWrapperAIDriver:driveFieldwork()
-- stop while wrapping only if we deon't have a baler. If we do we should continue driving and working
-- on the next bale, the baler code will take care about stopping if we need to
if self.baleWrapper.spec_baleWrapper.baleWrapperState ~= BaleWrapper.STATE_NONE and not self.baler then
self:setSpeed(0)
end
-- Yes, Giants has a typo in the state
if self.baleWrapper.spec_baleWrapper.baleWrapperState == BaleWrapper.STATE_WRAPPER_FINSIHED then
self.baleWrapper:doStateChange(BaleWrapper.CHANGE_WRAPPER_START_DROP_BALE)
-- Don't drop the bale in the turn
if not self.turnIsDriving then
-- stop while wrapping only if we deon't have a baler. If we do we should continue driving and working
-- on the next bale, the baler code will take care about stopping if we need to
if self.baleWrapper.spec_baleWrapper.baleWrapperState ~= BaleWrapper.STATE_NONE and not self.baler then
self:setSpeed(0)
end
-- Yes, Giants has a typo in the state
if self.baleWrapper.spec_baleWrapper.baleWrapperState == BaleWrapper.STATE_WRAPPER_FINSIHED then
self.baleWrapper:doStateChange(BaleWrapper.CHANGE_WRAPPER_START_DROP_BALE)
end
end
BalerAIDriver.driveFieldwork(self)
end

0 comments on commit 8443c3c

Please sign in to comment.