feat: markørvagt genstarter flowkøretøjer når AutoDrive nulstiller dem til markør 1 (v1.62.63)

This commit is contained in:
2026-10-07 22:23:20 +02:00
parent d5ed292741
commit e59c4949d6
4 changed files with 129 additions and 1 deletions
+8
View File
@@ -1173,6 +1173,10 @@ local function installHook(adEnv)
if ADOutbound ~= nil and ADOutbound.install ~= nil then
ADOutbound.install(adEnv)
end
if ADMarkerGuard ~= nil then
local okGuard, errGuard = pcall(ADMarkerGuard.install, ADMarkerGuard.gameEnv(adEnv))
if not okGuard then Logging.warning(ADSmartPickup.LOG_PREFIX .. "markørvagt kunne ikke installeres: %s", tostring(errGuard)) end
end
if ADHitchCreep ~= nil and ADHitchCreep.install ~= nil then
ADHitchCreep.install(adEnv)
end
@@ -1350,6 +1354,10 @@ function ADSmartPickup:update(dt)
local okFlow, errFlow = pcall(ADFlowWagons.tick, getAutoDriveEnv(), dt)
if not okFlow then Logging.warning(ADSmartPickup.LOG_PREFIX .. "flow-vogne fejlede: %s", tostring(errFlow)) end
end
if ADMarkerGuard ~= nil and getAutoDriveEnv() ~= nil then
local okGuard, errGuard = pcall(ADMarkerGuard.tick, ADMarkerGuard.gameEnv(getAutoDriveEnv()))
if not okGuard then Logging.warning(ADSmartPickup.LOG_PREFIX .. "markørvagt fejlede: %s", tostring(errGuard)) end
end
if ADFlowSleep ~= nil then
local okSleep, errSleep = pcall(ADFlowSleep.tick, getAutoDriveEnv(), dt)
if not okSleep then Logging.warning(ADSmartPickup.LOG_PREFIX .. "dvale fejlede: %s", tostring(errSleep)) end