mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-28 17:45:27 +00:00
Only remove planned tasks
This commit is contained in:
@@ -309,7 +309,9 @@ do -- TASK_A2A_DISPATCHER
|
||||
local TaskReport = REPORT:New()
|
||||
|
||||
-- Checking the task queue for the dispatcher, and removing any obsolete task!
|
||||
for TaskIndex, Task in pairs( self.Tasks ) do
|
||||
for TaskIndex, TaskData in pairs( self.Tasks ) do
|
||||
local Task = TaskData -- Tasking.Task#TASK
|
||||
if Task:IsStatePlanned() then
|
||||
local DetectedItem = Detection:GetDetectedItem( TaskIndex )
|
||||
if not DetectedItem then
|
||||
local TaskText = Task:GetName()
|
||||
@@ -320,6 +322,7 @@ do -- TASK_A2A_DISPATCHER
|
||||
self.Tasks[TaskIndex] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Now that all obsolete tasks are removed, loop through the detected targets.
|
||||
for DetectedItemID, DetectedItem in pairs( Detection:GetDetectedItems() ) do
|
||||
|
||||
Reference in New Issue
Block a user