Skip to content

Commit

Permalink
Comment baler change. Will be implemented later maybe.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwiti6190 committed Jan 6, 2022
1 parent 7cb4eb5 commit a6873db
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/ai/BalerController.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function BalerController:isHandlingAllowed()
return true
end

--- TODO: Automatic baler are currently slowing down.
function BalerController:handleBaler()
local maxSpeed

Expand Down Expand Up @@ -77,7 +78,8 @@ 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.allowsBaleUnloading then
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,8 +92,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
-- elseif self.balerSpec.platformDropInProgress then
-- maxSpeed = self.balerSpec.platformAIDropSpeed
end
return maxSpeed
end
Expand Down

0 comments on commit a6873db

Please sign in to comment.