Skip to content

Commit

Permalink
Potential baler fix
Browse files Browse the repository at this point in the history
  • Loading branch information
schwiti6190 committed Jan 6, 2022
1 parent b4a1d2b commit 7cb4eb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/ai/BalerController.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function BalerController:handleBaler()
local fillLevel = self.baler:getFillUnitFillLevel(self.balerSpec.fillUnitIndex)
local capacity = self.baler:getFillUnitCapacity(self.balerSpec.fillUnitIndex)

if not self.balerSpec.nonStopBaling and (self.balerSpec.hasUnloadingAnimation or self.balerSpec.allowsBaleUnloading) then
if not self.balerSpec.nonStopBaling and self.balerSpec.allowsBaleUnloading then
self:debugSparse("hasUnloadingAnimation: %s, allowsBaleUnloading: %s, nonStopBaling:%s",
tostring(self.balerSpec.hasUnloadingAnimation),tostring(self.balerSpec.allowsBaleUnloading),tostring(self.balerSpec.nonStopBaling))
--copy of giants code: AIDriveStrategyBaler:getDriveData(dt, vX,vY,vZ) to avoid leftover when full
Expand All @@ -90,6 +90,8 @@ function BalerController:handleBaler()
if fillLevel == capacity or self.balerSpec.unloadingState ~= Baler.UNLOADING_CLOSED then
maxSpeed = 0
end
elseif self.balerSpec.platformDropInProgress then
maxSpeed = self.balerSpec.platformAIDropSpeed
end
return maxSpeed
end
Expand Down

0 comments on commit 7cb4eb5

Please sign in to comment.