#PLAYERTASK

* remove two filters for task state where they do not belong
This commit is contained in:
Applevangelist 2022-08-27 18:26:04 +02:00
parent b468134432
commit 23815429e2

View File

@ -1524,7 +1524,7 @@ function PLAYERTASKCONTROLLER:_GetTasksPerType()
local threat=_data.threat
local task = _data.task -- Ops.PlayerTask#PLAYERTASK
local type = task.Type
if task:GetState() ~= "Executing" and not task:IsDone() then
if not task:IsDone() then
table.insert(tasktypes[type],task)
end
end
@ -1984,12 +1984,13 @@ function PLAYERTASKCONTROLLER:_JoinTask(Group, Client, Task)
end
return self
end
Task:AddClient(Client)
local taskstate = Task:GetState()
--self:T(self.lid.."Taskstate = "..taskstate)
if taskstate ~= "Executing" and taskstate ~= "Done" then
if not Task:IsDone() then
if taskstate ~= "Executing" then
Task:__Requested(-1)
Task:__Executing(-2)
end
Task:AddClient(Client)
local joined = self.gettext:GetEntry("PILOTJOINEDTASK",self.locale)
local text = string.format(joined, self.MenuName or self.Name, ttsplayername, Task.PlayerTaskNr)
self:T(self.lid..text)