mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#PLAYERTASK
* Even nicer MGRS readouts
This commit is contained in:
parent
0d8b94c7fd
commit
5898bc7f07
@ -3062,10 +3062,12 @@ function PLAYERTASKCONTROLLER:_ActiveTaskInfo(Group, Client, Task)
|
|||||||
text=string.gsub(text,"°M|","° magnetic; ")
|
text=string.gsub(text,"°M|","° magnetic; ")
|
||||||
end
|
end
|
||||||
if string.find(CoordText,"MGRS") then
|
if string.find(CoordText,"MGRS") then
|
||||||
local Text = string.gsub(CoordText,"%d","%1;") -- "0 5 1 "
|
local Text = string.gsub(CoordText,"MGRS ","")
|
||||||
Text = string.gsub(Text," $","") -- "0 5 1"
|
Text = string.gsub(Text,"%s+","")
|
||||||
CoordText = string.gsub(Text,"0","zero")
|
Text = string.gsub(Text,"([%a%d])","%1;") -- "0 5 1 "
|
||||||
CoordText = string.gsub(Text,"MGRS","MGRS;")
|
Text = string.gsub(Text,"0","zero")
|
||||||
|
Text = string.gsub(Text,"9","niner")
|
||||||
|
CoordText = "MGRS;"..Text
|
||||||
if self.PathToGoogleKey then
|
if self.PathToGoogleKey then
|
||||||
CoordText = string.format("<say-as interpret-as='characters'>%s</say-as>",CoordText)
|
CoordText = string.format("<say-as interpret-as='characters'>%s</say-as>",CoordText)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user