fix: ødelagte køretøjer springes over og stoppes (kan ikke nulstilles midt i et job)

This commit is contained in:
2026-10-20 16:10:18 +02:00
parent 7384f23b47
commit 8cadbfffaf
12 changed files with 178 additions and 8 deletions
+2
View File
@@ -483,6 +483,8 @@ local positionOf = ADUtil.positionOf
local function isOwnFree(vehicle, tractorId, run)
if vehicle == nil then return false end
-- ødelagt (fx kørt i vandet, in-game 20/10): AD/CP kan ikke køre den — vækkes ikke
if ADPool ~= nil and ADPool.skipBroken ~= nil and ADPool.skipBroken(vehicle) then return false end
local status = ADFlowWagons ~= nil and ADFlowWagons.statusOf ~= nil and ADFlowWagons.statusOf(vehicle) or nil
local onOwnTrip = ADFlowSleep.isOwnTrip(status)
local otherRun = ADRunsController.getRunForVehicle(vehicle)