mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#PLAYERTASK
* Added option to show coord of target in info (always)
This commit is contained in:
parent
ed84d7453d
commit
67a2deb3a4
@ -506,7 +506,7 @@ function PLAYERTASK:MarkTargetOnF10Map(Text,Coalition,ReadOnly)
|
|||||||
self.TargetMarker:Remove()
|
self.TargetMarker:Remove()
|
||||||
end
|
end
|
||||||
local text = Text or "Target of "..self.lid
|
local text = Text or "Target of "..self.lid
|
||||||
self.TargetMarker = MARKER:New(coordinate,"Target of "..self.lid)
|
self.TargetMarker = MARKER:New(coordinate,text)
|
||||||
if ReadOnly then
|
if ReadOnly then
|
||||||
self.TargetMarker:ReadOnly()
|
self.TargetMarker:ReadOnly()
|
||||||
end
|
end
|
||||||
@ -923,6 +923,8 @@ do
|
|||||||
-- @field #number Coalition
|
-- @field #number Coalition
|
||||||
-- @field Core.Menu#MENU_MISSION MenuParent
|
-- @field Core.Menu#MENU_MISSION MenuParent
|
||||||
-- @field #boolean ShowMagnetic Also show magnetic angles
|
-- @field #boolean ShowMagnetic Also show magnetic angles
|
||||||
|
-- @field #boolean InfoHasCoordinate
|
||||||
|
-- @field #boolean InfoHasLLDDM
|
||||||
-- @extends Core.Fsm#FSM
|
-- @extends Core.Fsm#FSM
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -1108,6 +1110,7 @@ do
|
|||||||
-- FLASHMENU = "Flash Directions Switch",
|
-- FLASHMENU = "Flash Directions Switch",
|
||||||
-- BRIEFING = "Briefing",
|
-- BRIEFING = "Briefing",
|
||||||
-- TARGETLOCATION ="Target location",
|
-- TARGETLOCATION ="Target location",
|
||||||
|
-- COORDINATE = "Coordinate",
|
||||||
-- },
|
-- },
|
||||||
--
|
--
|
||||||
-- e.g.
|
-- e.g.
|
||||||
@ -1236,6 +1239,8 @@ PLAYERTASKCONTROLLER = {
|
|||||||
Coalition = nil,
|
Coalition = nil,
|
||||||
MenuParent = nil,
|
MenuParent = nil,
|
||||||
ShowMagnetic = true,
|
ShowMagnetic = true,
|
||||||
|
InfoHasLLDDM = false,
|
||||||
|
InfoHasCoordinate = false,
|
||||||
}
|
}
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -1333,6 +1338,7 @@ PLAYERTASKCONTROLLER.Messages = {
|
|||||||
FLASHMENU = "Flash Directions Switch",
|
FLASHMENU = "Flash Directions Switch",
|
||||||
BRIEFING = "Briefing",
|
BRIEFING = "Briefing",
|
||||||
TARGETLOCATION ="Target location",
|
TARGETLOCATION ="Target location",
|
||||||
|
COORDINATE = "Coordinate",
|
||||||
},
|
},
|
||||||
DE = {
|
DE = {
|
||||||
TASKABORT = "Auftrag abgebrochen!",
|
TASKABORT = "Auftrag abgebrochen!",
|
||||||
@ -1396,13 +1402,14 @@ PLAYERTASKCONTROLLER.Messages = {
|
|||||||
FLASHOFF = "%s - Richtungsangaben einblenden ist AUS!",
|
FLASHOFF = "%s - Richtungsangaben einblenden ist AUS!",
|
||||||
FLASHMENU = "Richtungsangaben Schalter",
|
FLASHMENU = "Richtungsangaben Schalter",
|
||||||
BRIEFING = "Briefing",
|
BRIEFING = "Briefing",
|
||||||
TARGETLOCATION ="Zielkoordinate",
|
TARGETLOCATION ="Zielposition",
|
||||||
|
COORDINATE = "Koordinate",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
--- PLAYERTASK class version.
|
--- PLAYERTASK class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
PLAYERTASKCONTROLLER.version="0.1.47"
|
PLAYERTASKCONTROLLER.version="0.1.48"
|
||||||
|
|
||||||
--- Create and run a new TASKCONTROLLER instance.
|
--- Create and run a new TASKCONTROLLER instance.
|
||||||
-- @param #PLAYERTASKCONTROLLER self
|
-- @param #PLAYERTASKCONTROLLER self
|
||||||
@ -1638,6 +1645,18 @@ function PLAYERTASKCONTROLLER:SetEnableSmokeFlareTask()
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- [User] Show info text on screen with a coordinate info in any case (OFF by default)
|
||||||
|
-- @param #PLAYERTASKCONTROLLER self
|
||||||
|
-- @param #boolean OnOff Switch on = true or off = false
|
||||||
|
-- @param #boolean LLDDM Show LLDDM = true or LLDMS = false
|
||||||
|
-- @return #PLAYERTASKCONTROLLER self
|
||||||
|
function PLAYERTASKCONTROLLER:SetInfoShowsCoordinate(OnOff,LLDDM)
|
||||||
|
self:T(self.lid.."SetInfoShowsCoordinate")
|
||||||
|
self.InfoHasCoordinate = OnOff
|
||||||
|
self.InfoHasLLDDM = LLDDM
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- [User] Set callsign options for TTS output. See @{Wrapper.Group#GROUP.GetCustomCallSign}() on how to set customized callsigns.
|
--- [User] Set callsign options for TTS output. See @{Wrapper.Group#GROUP.GetCustomCallSign}() on how to set customized callsigns.
|
||||||
-- @param #PLAYERTASKCONTROLLER self
|
-- @param #PLAYERTASKCONTROLLER self
|
||||||
-- @param #boolean ShortCallsign If true, only call out the major flight number
|
-- @param #boolean ShortCallsign If true, only call out the major flight number
|
||||||
@ -2733,6 +2752,7 @@ function PLAYERTASKCONTROLLER:_ActiveTaskInfo(Group, Client, Task)
|
|||||||
local ttstaskname = string.format(ttsname,task.TTSType,task.PlayerTaskNr)
|
local ttstaskname = string.format(ttsname,task.TTSType,task.PlayerTaskNr)
|
||||||
local Coordinate = task.Target:GetCoordinate()
|
local Coordinate = task.Target:GetCoordinate()
|
||||||
local CoordText = ""
|
local CoordText = ""
|
||||||
|
local CoordTextLLDM = nil
|
||||||
if self.Type ~= PLAYERTASKCONTROLLER.Type.A2A then
|
if self.Type ~= PLAYERTASKCONTROLLER.Type.A2A then
|
||||||
CoordText = Coordinate:ToStringA2G(Client,nil,self.ShowMagnetic)
|
CoordText = Coordinate:ToStringA2G(Client,nil,self.ShowMagnetic)
|
||||||
else
|
else
|
||||||
@ -2827,15 +2847,25 @@ function PLAYERTASKCONTROLLER:_ActiveTaskInfo(Group, Client, Task)
|
|||||||
else
|
else
|
||||||
local keine = self.gettext:GetEntry("NONE",self.locale)
|
local keine = self.gettext:GetEntry("NONE",self.locale)
|
||||||
clienttxt = clienttxt .. keine
|
clienttxt = clienttxt .. keine
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Task Report
|
|
||||||
text = text .. clienttxt
|
text = text .. clienttxt
|
||||||
|
textTTS = textTTS .. clienttxt
|
||||||
|
-- Task Report
|
||||||
|
if self.InfoHasCoordinate then
|
||||||
|
if self.InfoHasLLDDM then
|
||||||
|
CoordTextLLDM = Coordinate:ToStringLLDDM()
|
||||||
|
else
|
||||||
|
CoordTextLLDM = Coordinate:ToStringLLDMS()
|
||||||
|
end
|
||||||
|
-- TARGETLOCATION
|
||||||
|
local locatxt = self.gettext:GetEntry("COORDINATE",self.locale)
|
||||||
|
text = string.format("%s\n%s: %s",text,locatxt,CoordTextLLDM)
|
||||||
|
end
|
||||||
if task:HasFreetext() and not ( task.Type == AUFTRAG.Type.CTLD or task.Type == AUFTRAG.Type.CSAR) then
|
if task:HasFreetext() and not ( task.Type == AUFTRAG.Type.CTLD or task.Type == AUFTRAG.Type.CSAR) then
|
||||||
local brieftxt = self.gettext:GetEntry("BRIEFING",self.locale)
|
local brieftxt = self.gettext:GetEntry("BRIEFING",self.locale)
|
||||||
text = text .. string.format("\n%s: ",brieftxt)..task:GetFreetext()
|
text = text .. string.format("\n%s: ",brieftxt)..task:GetFreetext()
|
||||||
end
|
end
|
||||||
textTTS = textTTS .. clienttxt
|
|
||||||
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, ")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user