From dda96d8f0547817bce7ae3a94ec87950a01e0706 Mon Sep 17 00:00:00 2001 From: Thomas <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 9 Nov 2022 13:08:06 +0100 Subject: [PATCH] AWACS - Speak task info Feature request --- Moose Development/Moose/Ops/Awacs.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Moose Development/Moose/Ops/Awacs.lua b/Moose Development/Moose/Ops/Awacs.lua index 565fa451a..6194d7ea2 100644 --- a/Moose Development/Moose/Ops/Awacs.lua +++ b/Moose Development/Moose/Ops/Awacs.lua @@ -497,7 +497,7 @@ do -- @field #AWACS AWACS = { ClassName = "AWACS", -- #string - version = "0.2.47", -- #string + version = "0.2.48", -- #string lid = "", -- #string coalition = coalition.side.BLUE, -- #number coalitiontxt = "blue", -- #string @@ -3320,6 +3320,7 @@ function AWACS:_Showtask(Group) local targetstatus = currenttask.Target:GetState() local ToDo = currenttask.ToDo local description = currenttask.ScreenText + local descTTS = currenttask.ScreenText local callsign = Callsign if self.debug then @@ -3338,17 +3339,21 @@ function AWACS:_Showtask(Group) local targetpos = currenttask.Target:GetCoordinate() if pposition and targetpos then local alti = currenttask.Cluster.altitude or currenttask.Contact.altitude or currenttask.Contact.group:GetAltitude() - local direction = self:_ToStringBRA(pposition,targetpos,alti) + local direction, direcTTS = self:_ToStringBRA(pposition,targetpos,alti) description = description .. "\nBRA "..direction + descTTS = descTTS .."; "..direcTTS end elseif currenttask.ToDo == AWACS.TaskDescription.ANCHOR or currenttask.ToDo == AWACS.TaskDescription.REANCHOR then local targetpos = currenttask.Target:GetCoordinate() - local direction = self:_ToStringBR(pposition,targetpos) + local direction, direcTTS = self:_ToStringBR(pposition,targetpos) description = description .. "\nBR "..direction + descTTS = descTTS .. "; "..direcTTS end local statustxt = self.gettext:GetEntry("STATUS",self.locale) - MESSAGE:New(string.format("%s\n%s %s",description,statustxt,status),30,"AWACS",true):ToGroup(Group) - + --MESSAGE:New(string.format("%s\n%s %s",description,statustxt,status),30,"AWACS",true):ToGroup(Group) + local text = string.format("%s\n%s %s",description,statustxt,status) + local ttstext = string.format("%s\n%s %s",descTTS,statustxt,status) + self:_NewRadioEntry(ttstext,text,GID,true,true,true) end end end