mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#PLAYERTASKCONTROLLER
* Menu build lock
This commit is contained in:
parent
1cdbe55cdd
commit
5456cd04c3
@ -1536,7 +1536,7 @@ PLAYERTASKCONTROLLER.Messages = {
|
|||||||
|
|
||||||
--- PLAYERTASK class version.
|
--- PLAYERTASK class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
PLAYERTASKCONTROLLER.version="0.1.60"
|
PLAYERTASKCONTROLLER.version="0.1.60a"
|
||||||
|
|
||||||
--- Create and run a new TASKCONTROLLER instance.
|
--- Create and run a new TASKCONTROLLER instance.
|
||||||
-- @param #PLAYERTASKCONTROLLER self
|
-- @param #PLAYERTASKCONTROLLER self
|
||||||
@ -2195,8 +2195,10 @@ function PLAYERTASKCONTROLLER:_EventHandler(EventData)
|
|||||||
--local text = string.format("%s, %s, switch to %s for task assignment!",EventData.IniPlayerName,self.MenuName or self.Name,freqtext)
|
--local text = string.format("%s, %s, switch to %s for task assignment!",EventData.IniPlayerName,self.MenuName or self.Name,freqtext)
|
||||||
local text = string.format(switchtext,playername,self.MenuName or self.Name,freqtext)
|
local text = string.format(switchtext,playername,self.MenuName or self.Name,freqtext)
|
||||||
self.SRSQueue:NewTransmission(text,nil,self.SRS,timer.getAbsTime()+60,2,{EventData.IniGroup},text,30,self.BCFrequency,self.BCModulation)
|
self.SRSQueue:NewTransmission(text,nil,self.SRS,timer.getAbsTime()+60,2,{EventData.IniGroup},text,30,self.BCFrequency,self.BCModulation)
|
||||||
if EventData.IniUnitName then
|
if EventData.IniPlayerName then
|
||||||
self:_BuildMenus(CLIENT:FindByName(EventData.IniUnitName))
|
self.PlayerMenu[EventData.IniPlayerName] = nil
|
||||||
|
--self:_BuildMenus(CLIENT:FindByName(EventData.IniUnitName))
|
||||||
|
self:_BuildMenus(CLIENT:FindByPlayerName(EventData.IniPlayerName))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -3461,6 +3463,13 @@ end
|
|||||||
function PLAYERTASKCONTROLLER:_BuildMenus(Client,enforced,fromsuccess)
|
function PLAYERTASKCONTROLLER:_BuildMenus(Client,enforced,fromsuccess)
|
||||||
self:T(self.lid.."_BuildMenus")
|
self:T(self.lid.."_BuildMenus")
|
||||||
|
|
||||||
|
if self.MenuBuildLocked and (timer.getAbsTime() - self.MenuBuildLocked < 2) then
|
||||||
|
self:ScheduleOnce(2,self._BuildMenus,self,Client,enforced,fromsuccess)
|
||||||
|
return self
|
||||||
|
else
|
||||||
|
self.MenuBuildLocked = timer.getAbsTime()
|
||||||
|
end
|
||||||
|
|
||||||
local clients = self.ClientSet:GetAliveSet()
|
local clients = self.ClientSet:GetAliveSet()
|
||||||
local joinorabort = false
|
local joinorabort = false
|
||||||
local timedbuild = false
|
local timedbuild = false
|
||||||
@ -3653,6 +3662,7 @@ function PLAYERTASKCONTROLLER:_BuildMenus(Client,enforced,fromsuccess)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
self.MenuBuildLocked = false
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user