feat: trigger-lås — flow-vogne tipper kun i målets bygning; dryp kun ved tipning; rul fra 0,1 m (1.62.380)

This commit is contained in:
2026-10-19 15:20:59 +02:00
parent b60e3d59e4
commit 7c3794038c
6 changed files with 167 additions and 2 deletions
+8
View File
@@ -1772,6 +1772,10 @@ local function installHook(adEnv)
ADUnloadWait.install(adEnv)
end
-- efter Wait-logikken: rulningen ligger yderst og springer den over, mens toget ruller frem
if ADTriggerLock ~= nil and ADTriggerLock.install ~= nil then
local okLock, errLock = pcall(ADTriggerLock.install, adEnv)
if not okLock then Logging.warning(ADSmartPickup.LOG_PREFIX .. "trigger-lås kunne ikke installeres: %s", tostring(errLock)) end
end
if ADUnloadRoll ~= nil and ADUnloadRoll.install ~= nil then
ADUnloadRoll.install(adEnv)
end
@@ -2018,6 +2022,10 @@ function ADSmartPickup:update(dt)
local okHead, errHead = pcall(ADHeadOn.tick, getAutoDriveEnv(), dt)
if not okHead then Logging.warning(ADSmartPickup.LOG_PREFIX .. "modkørsel fejlede: %s", tostring(errHead)) end
end
if ADTriggerLock ~= nil then
local okLock, errLock = pcall(ADTriggerLock.tick, getAutoDriveEnv(), dt)
if not okLock then Logging.warning(ADSmartPickup.LOG_PREFIX .. "trigger-lås fejlede: %s", tostring(errLock)) end
end
if ADStrayUnload ~= nil then
local okStray, errStray = pcall(ADStrayUnload.tick, getAutoDriveEnv(), dt)
if not okStray then Logging.warning(ADSmartPickup.LOG_PREFIX .. "fuldt mål fejlede: %s", tostring(errStray)) end