mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user