From a6873dbf346ce8a97558e543e7d72cef990ae3b8 Mon Sep 17 00:00:00 2001 From: schwiti6190 <58079399+schwiti6190@users.noreply.github.com> Date: Thu, 6 Jan 2022 16:38:01 +0100 Subject: [PATCH] Comment baler change. Will be implemented later maybe. --- scripts/ai/BalerController.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/ai/BalerController.lua b/scripts/ai/BalerController.lua index bf7b4f334..c729b9df9 100644 --- a/scripts/ai/BalerController.lua +++ b/scripts/ai/BalerController.lua @@ -46,6 +46,7 @@ function BalerController:isHandlingAllowed() return true end +--- TODO: Automatic baler are currently slowing down. function BalerController:handleBaler() local maxSpeed @@ -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 @@ -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