feat: flows kan låne en ledig traktor + aflæsnings-skub ved trigger undervejs (1.62.364)
This commit is contained in:
@@ -1340,7 +1340,11 @@ function ADRunsController.queueStartAll(adEnv)
|
||||
local vehiclesById = getFarmVehiclesById(adEnv)
|
||||
local queue = {}
|
||||
for _, run in ipairs(ADRunsController.store.runs) do
|
||||
if #run.vehicleIds > 0 then
|
||||
if run.borrowWagonId ~= nil then
|
||||
-- lånt traktor: "tændt" = venter i dvale på en tur (ADFlowSleep låner en traktor). En traktor der stadig er på vej
|
||||
-- hjem, hentes ikke tilbage uden en tur (review 19/10) — den slippes, og vågn-tjekket låner igen ved arbejde
|
||||
if run.stopped and not run.sleeping then run.sleeping = true end
|
||||
elseif #run.vehicleIds > 0 then
|
||||
local action = ADRuns.startAllAction(ADRunsController.getRunStatus(adEnv, run).isRunning, run.stopped == true)
|
||||
if action ~= "queue" then
|
||||
summary.alreadyRunning = summary.alreadyRunning + 1
|
||||
@@ -1586,7 +1590,9 @@ end
|
||||
function ADRunsController.startAllRuns(adEnv)
|
||||
local summary = {runsStarted = 0, alreadyRunning = 0, vehiclesStarted = 0, results = {}}
|
||||
for _, run in ipairs(ADRunsController.store.runs) do
|
||||
if #run.vehicleIds > 0 then
|
||||
if run.borrowWagonId ~= nil then
|
||||
if run.stopped and not run.sleeping then run.sleeping = true end
|
||||
elseif #run.vehicleIds > 0 then
|
||||
local action = ADRuns.startAllAction(ADRunsController.getRunStatus(adEnv, run).isRunning, run.stopped == true)
|
||||
if action ~= "queue" then
|
||||
summary.alreadyRunning = summary.alreadyRunning + 1
|
||||
|
||||
Reference in New Issue
Block a user