fix(flows): Start alle ophæver pausen også for flows hvis traktorer allerede kører
Flows på pause (Stop alt) med traktorer der kørte videre på en gemt AD-tur blev talt som 'kørte allerede' og forblev stoppede; efter at have hentet vognen så flowet sig selv som stoppet og kørte vognen hjem igen (v1.60.12.0).
This commit is contained in:
@@ -1137,8 +1137,10 @@ function ADRunsController.queueStartAll(adEnv)
|
||||
local queue = {}
|
||||
for _, run in ipairs(ADRunsController.store.runs) do
|
||||
if #run.vehicleIds > 0 then
|
||||
if ADRunsController.getRunStatus(adEnv, run).isRunning then
|
||||
local action = ADRuns.startAllAction(ADRunsController.getRunStatus(adEnv, run).isRunning, run.stopped == true)
|
||||
if action ~= "queue" then
|
||||
summary.alreadyRunning = summary.alreadyRunning + 1
|
||||
if action == "resume" then run.stopped = false end
|
||||
else
|
||||
run.stopped = false
|
||||
for _, vehicleId in ipairs(run.vehicleIds) do
|
||||
@@ -1310,8 +1312,10 @@ 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 ADRunsController.getRunStatus(adEnv, run).isRunning then
|
||||
local action = ADRuns.startAllAction(ADRunsController.getRunStatus(adEnv, run).isRunning, run.stopped == true)
|
||||
if action ~= "queue" then
|
||||
summary.alreadyRunning = summary.alreadyRunning + 1
|
||||
if action == "resume" then run.stopped = false end
|
||||
else
|
||||
local startedHere = 0
|
||||
for _, result in ipairs(ADRunsController.startRun(adEnv, run.id)) do
|
||||
|
||||
Reference in New Issue
Block a user