Added JTAC to DETECTION_DISPATCHER

Added Process_JTAC to coordinate this activity during a CAS or BAI.
Removed TASK_CAS and TASK BAI into a generic TASK_A2G task.
This commit is contained in:
FlightControl
2016-07-21 15:28:53 +02:00
parent 8e8fcef266
commit 2eeaf7b92d
56 changed files with 1440 additions and 1280 deletions

View File

@@ -2198,4 +2198,121 @@ function CONTROLLABLE:WayPointExecute( WayPoint, WaitTime )
return self
end
-- Message APIs
--- Returns a message with the callsign embedded (if there is one).
-- @param #CONTROLLABLE self
-- @param #string Message The message text
-- @param DCSTypes#Duration Duration The duration of the message.
-- @return Message#MESSAGE
function CONTROLLABLE:GetMessage( Message, Duration )
self:E( { Message, Duration } )
local DCSObject = self:GetDCSObject()
if DCSObject then
return MESSAGE:New( Message, Duration, self:GetCallsign() .. " (" .. self:GetTypeName() .. ")" )
end
return nil
end
--- Send a message to all coalitions.
-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
-- @param #CONTROLLABLE self
-- @param #string Message The message text
-- @param DCSTypes#Duration Duration The duration of the message.
function CONTROLLABLE:MessageToAll( Message, Duration )
self:F2( { Message, Duration } )
local DCSObject = self:GetDCSObject()
if DCSObject then
self:GetMessage( Message, Duration ):ToAll()
end
return nil
end
--- Send a message to the red coalition.
-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
-- @param #CONTROLLABLE self
-- @param #string Message The message text
-- @param DCSTYpes#Duration Duration The duration of the message.
function CONTROLLABLE:MessageToRed( Message, Duration )
self:F2( { Message, Duration } )
local DCSObject = self:GetDCSObject()
if DCSObject then
self:GetMessage( Message, Duration ):ToRed()
end
return nil
end
--- Send a message to the blue coalition.
-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
-- @param #CONTROLLABLE self
-- @param #string Message The message text
-- @param DCSTypes#Duration Duration The duration of the message.
function CONTROLLABLE:MessageToBlue( Message, Duration )
self:F2( { Message, Duration } )
local DCSObject = self:GetDCSObject()
if DCSObject then
self:GetMessage( Message, Duration ):ToBlue()
end
return nil
end
--- Send a message to a client.
-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
-- @param #CONTROLLABLE self
-- @param #string Message The message text
-- @param DCSTypes#Duration Duration The duration of the message.
-- @param Client#CLIENT Client The client object receiving the message.
function CONTROLLABLE:MessageToClient( Message, Duration, Client )
self:F2( { Message, Duration } )
local DCSObject = self:GetDCSObject()
if DCSObject then
self:GetMessage( Message, Duration ):ToClient( Client )
end
return nil
end
--- Send a message to a @{Group}.
-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
-- @param #CONTROLLABLE self
-- @param #string Message The message text
-- @param DCSTypes#Duration Duration The duration of the message.
-- @param Group#GROUP MessageGroup The GROUP object receiving the message.
function CONTROLLABLE:MessageToGroup( Message, Duration, MessageGroup )
self:F2( { Message, Duration } )
local DCSObject = self:GetDCSObject()
if DCSObject then
if DCSObject:isExist() then
self:GetMessage( Message, Duration ):ToGroup( MessageGroup )
end
end
return nil
end
--- Send a message to the players in the @{Group}.
-- The message will appear in the message area. The message will begin with the callsign of the group and the type of the first unit sending the message.
-- @param #CONTROLLABLE self
-- @param #string Message The message text
-- @param DCSTypes#Duration Duration The duration of the message.
function CONTROLLABLE:Message( Message, Duration )
self:F2( { Message, Duration } )
local DCSObject = self:GetDCSObject()
if DCSObject then
self:GetMessage( Message, Duration ):ToGroup( self )
end
return nil
end