From 7cb4eb5e23d76aa68634d788346cd31276741289 Mon Sep 17 00:00:00 2001 From: schwiti6190 <58079399+schwiti6190@users.noreply.github.com> Date: Thu, 6 Jan 2022 15:19:30 +0100 Subject: [PATCH] Potential baler fix --- scripts/ai/BalerController.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/ai/BalerController.lua b/scripts/ai/BalerController.lua index 570f6dbc2..bf7b4f334 100644 --- a/scripts/ai/BalerController.lua +++ b/scripts/ai/BalerController.lua @@ -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 @@ -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