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