fix(status): valgt lager der ikke kan bruges viser den præcise grund i status (ikke 'intet lager med plads') (v1.19.10.0)

This commit is contained in:
2026-09-25 00:27:32 +02:00
parent 3111033805
commit d41e2776de
6 changed files with 14 additions and 3 deletions
+2
View File
@@ -210,6 +210,7 @@ local function findStoreMarker(adEnv, vehicle, product, capacity, sources, liter
end
end
if hasForcedShed then
product.storeReason = table.concat(reasons, "; ")
warnOnce(adEnv, vehicle, "forcedShed:" .. tostring(product.name) .. ":" .. table.concat(reasons, ";"), string.format("'%s': %s kan ikke sættes på lager — %s", tostring(ADRuns.vehicleLabel(vehicle)), tostring(product.name), table.concat(reasons, "; ")))
return nil
end
@@ -233,6 +234,7 @@ local function findStoreMarker(adEnv, vehicle, product, capacity, sources, liter
if #forced > 0 and ADLoadSwap.findForcedDumpMarker ~= nil then
local chosen, why = ADLoadSwap.findForcedDumpMarker(adEnv, vehicle, product.fillType, liters, forced, isReachable)
if chosen == nil then
product.storeReason = tostring(why)
warnOnce(adEnv, vehicle, "forced:" .. tostring(product.name) .. ":" .. tostring(why), string.format("'%s': %s kan ikke læsses af — %s", tostring(ADRuns.vehicleLabel(vehicle)), tostring(product.name), tostring(why)))
return nil
end