mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#PLAYERTASK
* Short playername usage for broadcast
This commit is contained in:
parent
4dc43263a5
commit
7743456d7d
@ -1105,7 +1105,7 @@ PLAYERTASKCONTROLLER.Messages = {
|
|||||||
|
|
||||||
--- PLAYERTASK class version.
|
--- PLAYERTASK class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
PLAYERTASKCONTROLLER.version="0.1.22"
|
PLAYERTASKCONTROLLER.version="0.1.23"
|
||||||
|
|
||||||
--- Constructor
|
--- Constructor
|
||||||
-- @param #PLAYERTASKCONTROLLER self
|
-- @param #PLAYERTASKCONTROLLER self
|
||||||
@ -1359,8 +1359,14 @@ function PLAYERTASKCONTROLLER:_EventHandler(EventData)
|
|||||||
if type(modulation) == "table" then modulation = modulation[1] end
|
if type(modulation) == "table" then modulation = modulation[1] end
|
||||||
modulation = UTILS.GetModulationName(modulation)
|
modulation = UTILS.GetModulationName(modulation)
|
||||||
local switchtext = self.gettext:GetEntry("BROADCAST",self.locale)
|
local switchtext = self.gettext:GetEntry("BROADCAST",self.locale)
|
||||||
|
|
||||||
|
local playername = EventData.IniPlayerName
|
||||||
|
if string.find(playername,"|") then
|
||||||
|
-- personalized flight name in player naming
|
||||||
|
playername = string.match(playername,"| ([%a]+)")
|
||||||
|
end
|
||||||
--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,self.MenuName or self.Name,EventData.IniPlayerName,freqtext)
|
local text = string.format(switchtext,self.MenuName or self.Name,playername,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)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user