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

Commit

Permalink
01.0007: fixed nil issue with attached combines
Browse files Browse the repository at this point in the history
#1546   fixes #1585
  • Loading branch information
ThomasGaertner committed Jan 4, 2017
1 parent 94e38f9 commit a2e36e4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions drive.lua
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ function courseplay:drive(self, dt)
elseif self.cp.previousWaypointIndex == self.cp.stopWork and self.cp.abortWork ~= nil then
courseplay:setVehicleWait(self, false);
elseif self.cp.previousWaypointIndex ~= self.cp.startWork and self.cp.previousWaypointIndex ~= self.cp.stopWork then
if self.cp.isCombine then
CpManager:setGlobalInfoText(self, 'OVERLOADING_POINT');
else
if self.cp.hasBaleLoader then
CpManager:setGlobalInfoText(self, 'UNLOADING_BALE');
else
CpManager:setGlobalInfoText(self, 'OVERLOADING_POINT');
end
if self.cp.totalFillLevelPercent == 0 or drive_on then
courseplay:setVehicleWait(self, false);
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="34">
<version>5.01.00006</version>
<version>5.01.00007</version>
<author><![CDATA[Courseplay Dev Team]]></author>
<title>
<br>Courseplay</br>
Expand Down
14 changes: 7 additions & 7 deletions mode6.lua
Original file line number Diff line number Diff line change
Expand Up @@ -447,19 +447,19 @@ function courseplay:handle_mode6(vehicle, allowedToDrive, workSpeed, lx , lz, re
tool.stopForManualUnloader = true
end

if tool.cp.totalFillLevelPercent >= min(tool.cp.driveOnAtFillLevel,99) and tool.cp.hasUnloadingRefillingCourse then
if courseplay:timerIsThrough(tool, 'emptyStrawBox', false) then
if tool.cp.abortWork == nil then
courseplay:setAbortWorkWaypoint(tool);
courseplay:resetCustomTimer(tool, 'emptyStrawBox', true);
if vehicle.cp.totalFillLevelPercent >= min(vehicle.cp.driveOnAtFillLevel,99) and vehicle.cp.hasUnloadingRefillingCourse then
if courseplay:timerIsThrough(vehicle, 'emptyStrawBox', false) then
if vehicle.cp.abortWork == nil then
courseplay:setAbortWorkWaypoint(vehicle);
courseplay:resetCustomTimer(vehicle, 'emptyStrawBox', true);
end
else
allowedToDrive = false;
end
if tool.isStrawEnabled and courseplay:timerIsThrough(tool, 'emptyStrawBox', true) and tool.cp.abortWork == nil then
if tool.isStrawEnabled and courseplay:timerIsThrough(vehicle, 'emptyStrawBox', true) and vehicle.cp.abortWork == nil then
local strawTimer = tool.strawToggleTime or 3500;
strawTimer = strawTimer / 1000
courseplay:setCustomTimer(tool, 'emptyStrawBox', strawTimer);
courseplay:setCustomTimer(vehicle, 'emptyStrawBox', strawTimer);
end
end

Expand Down

0 comments on commit a2e36e4

Please sign in to comment.