mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#PLAYERTASK
* slower callout for MGRS coordinates #CTLD * Reduce log noise
This commit is contained in:
@@ -4621,7 +4621,7 @@ end
|
|||||||
-- @param Wrapper.Group#GROUP Vehicle The #GROUP object of the vehicle or FOB build.
|
-- @param Wrapper.Group#GROUP Vehicle The #GROUP object of the vehicle or FOB build.
|
||||||
-- @return #CTLD self
|
-- @return #CTLD self
|
||||||
function CTLD:onbeforeCratesBuild(From, Event, To, Group, Unit, Vehicle)
|
function CTLD:onbeforeCratesBuild(From, Event, To, Group, Unit, Vehicle)
|
||||||
self:I({From, Event, To})
|
self:T({From, Event, To})
|
||||||
if Unit and Unit:IsPlayer() and self.PlayerTaskQueue then
|
if Unit and Unit:IsPlayer() and self.PlayerTaskQueue then
|
||||||
local playername = Unit:GetPlayerName()
|
local playername = Unit:GetPlayerName()
|
||||||
local dropcoord = Vehicle:GetCoordinate() or COORDINATE:New(0,0,0)
|
local dropcoord = Vehicle:GetCoordinate() or COORDINATE:New(0,0,0)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
-- ===
|
-- ===
|
||||||
-- @module Ops.PlayerTask
|
-- @module Ops.PlayerTask
|
||||||
-- @image OPS_PlayerTask.jpg
|
-- @image OPS_PlayerTask.jpg
|
||||||
-- @date Last Update November 2022
|
-- @date Last Update December 2022
|
||||||
|
|
||||||
|
|
||||||
do
|
do
|
||||||
@@ -1409,7 +1409,7 @@ PLAYERTASKCONTROLLER.Messages = {
|
|||||||
|
|
||||||
--- PLAYERTASK class version.
|
--- PLAYERTASK class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
PLAYERTASKCONTROLLER.version="0.1.50"
|
PLAYERTASKCONTROLLER.version="0.1.51"
|
||||||
|
|
||||||
--- Create and run a new TASKCONTROLLER instance.
|
--- Create and run a new TASKCONTROLLER instance.
|
||||||
-- @param #PLAYERTASKCONTROLLER self
|
-- @param #PLAYERTASKCONTROLLER self
|
||||||
@@ -2922,10 +2922,20 @@ function PLAYERTASKCONTROLLER:_ActiveTaskInfo(Group, Client, Task)
|
|||||||
|
|
||||||
if self.UseSRS then
|
if self.UseSRS then
|
||||||
if string.find(CoordText," BR, ") then
|
if string.find(CoordText," BR, ") then
|
||||||
CoordText = string.gsub(CoordText," BR, "," Bee, Arr, ")
|
CoordText = string.gsub(CoordText," BR, "," Bee, Arr; ")
|
||||||
end
|
end
|
||||||
if self.ShowMagnetic then
|
if self.ShowMagnetic then
|
||||||
text=string.gsub(text,"°M|","° magnetic, ")
|
text=string.gsub(text,"°M|","° magnetic; ")
|
||||||
|
end
|
||||||
|
if string.find(CoordText,"MGRS") then
|
||||||
|
local Text = string.gsub(CoordText,"%d","%1;") -- "0 5 1 "
|
||||||
|
Text = string.gsub(Text," $","") -- "0 5 1"
|
||||||
|
CoordText = string.gsub(Text,"0","zero")
|
||||||
|
CoordText = string.gsub(Text,"MGRS","MGRS;")
|
||||||
|
if self.PathToGoogleKey then
|
||||||
|
CoordText = string.format("<say-as interpret-as='characters'>%s</say-as>",CoordText)
|
||||||
|
end
|
||||||
|
--self:I(self.lid.." | ".. CoordText)
|
||||||
end
|
end
|
||||||
local ThreatLocaleTextTTS = self.gettext:GetEntry("THREATTEXTTTS",self.locale)
|
local ThreatLocaleTextTTS = self.gettext:GetEntry("THREATTEXTTTS",self.locale)
|
||||||
local ttstext = string.format(ThreatLocaleTextTTS,self.MenuName or self.Name,ttsplayername,ttstaskname,ThreatLevelText, targets, CoordText)
|
local ttstext = string.format(ThreatLocaleTextTTS,self.MenuName or self.Name,ttsplayername,ttstaskname,ThreatLevelText, targets, CoordText)
|
||||||
|
|||||||
Reference in New Issue
Block a user