Skip to content

Commit

Permalink
Bugfix in TrailerUtil
Browse files Browse the repository at this point in the history
probably caused by adding more trigger types, such as the bunkerSilo
  • Loading branch information
Stephan-S authored Jun 3, 2019
1 parent a8a4af9 commit b005c36
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions FS19_AutoDrive/scripts/AutoDriveTrailerUtil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,13 @@ function AutoDrive:handleTrailers(vehicle, dt)
for _,trailer in pairs(trailers) do
for _,trigger in pairs(AutoDrive.Triggers.siloTriggers) do
local activate = false;
for __,fillableObject in pairs(trigger.fillableObjects) do
if fillableObject.object == trailer then
activate = true;
end;
end;
if trigger.fillableObjects ~= nil then
for __,fillableObject in pairs(trigger.fillableObjects) do
if fillableObject.object == trailer then
activate = true;
end;
end;
end;
if AutoDrive:getSetting("continueOnEmptySilo") and vehicle.ad.isLoading and vehicle.ad.isPaused and not trigger.isLoading and vehicle.ad.startedLoadingAtTrigger then --trigger must be empty by now. Drive on!
vehicle.ad.isPaused = false;
vehicle.ad.isUnloading = false;
Expand Down Expand Up @@ -246,4 +248,4 @@ function AutoDrive:getTrailersOfImplement(attachedImplement)
end;

return;
end;
end;

0 comments on commit b005c36

Please sign in to comment.