mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'FC/Documentation-Release_2.3' into FC/DETECTION_UNITS_class_broken___#773
This commit is contained in:
commit
9d100e9bc1
@ -767,7 +767,7 @@ function SCORING:_AddMissionTaskScore( Mission, PlayerUnit, Text, Score )
|
||||
PlayerData.Score = self.Players[PlayerName].Score + Score
|
||||
PlayerData.Mission[MissionName].ScoreTask = self.Players[PlayerName].Mission[MissionName].ScoreTask + Score
|
||||
|
||||
MESSAGE:NewType( self.DisplayMessagePrefix .. MissionName .. " : " .. Text .. " Score: " .. Score, MESSAGE.Type.Information ):ToAll()
|
||||
MESSAGE:NewType( self.DisplayMessagePrefix .. Mission:GetText() .. " : " .. Text .. " Score: " .. Score, MESSAGE.Type.Information ):ToAll()
|
||||
|
||||
self:ScoreCSV( PlayerName, "", "TASK_" .. MissionName:gsub( ' ', '_' ), 1, Score, PlayerUnit:GetName() )
|
||||
end
|
||||
@ -801,7 +801,7 @@ function SCORING:_AddMissionGoalScore( Mission, PlayerName, Text, Score )
|
||||
PlayerData.Score = self.Players[PlayerName].Score + Score
|
||||
PlayerData.Mission[MissionName].ScoreTask = self.Players[PlayerName].Mission[MissionName].ScoreTask + Score
|
||||
|
||||
MESSAGE:NewType( string.format( "%s%s: %s! Player %s receives %d score!", self.DisplayMessagePrefix, MissionName, Text, PlayerName, Score ), MESSAGE.Type.Information ):ToAll()
|
||||
MESSAGE:NewType( string.format( "%s%s: %s! Player %s receives %d score!", self.DisplayMessagePrefix, Mission:GetText(), Text, PlayerName, Score ), MESSAGE.Type.Information ):ToAll()
|
||||
|
||||
self:ScoreCSV( PlayerName, "", "TASK_" .. MissionName:gsub( ' ', '_' ), 1, Score )
|
||||
end
|
||||
@ -828,7 +828,7 @@ function SCORING:_AddMissionScore( Mission, Text, Score )
|
||||
PlayerData.Score = PlayerData.Score + Score
|
||||
PlayerData.Mission[MissionName].ScoreMission = PlayerData.Mission[MissionName].ScoreMission + Score
|
||||
|
||||
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' has " .. Text .. " in Mission '" .. MissionName .. "'. " ..
|
||||
MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' has " .. Text .. " in " .. Mission:GetText() .. ". " ..
|
||||
Score .. " mission score!",
|
||||
MESSAGE.Type.Information ):ToAll()
|
||||
|
||||
|
||||
@ -204,6 +204,24 @@ function COMMANDCENTER:GetName()
|
||||
return self.CommandCenterName
|
||||
end
|
||||
|
||||
--- Gets the text string of the HQ command center.
|
||||
-- @param #COMMANDCENTER self
|
||||
-- @return #string
|
||||
function COMMANDCENTER:GetText()
|
||||
|
||||
return "Command Center [" .. self.CommandCenterName .. "]"
|
||||
end
|
||||
|
||||
--- Gets the short text string of the HQ command center.
|
||||
-- @param #COMMANDCENTER self
|
||||
-- @return #string
|
||||
function COMMANDCENTER:GetShortText()
|
||||
|
||||
return "CC [" .. self.CommandCenterName .. "]"
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Gets the POSITIONABLE of the HQ command center.
|
||||
-- @param #COMMANDCENTER self
|
||||
-- @return Wrapper.Positionable#POSITIONABLE
|
||||
@ -360,7 +378,7 @@ end
|
||||
-- @param Wrapper.Group#GROUP TaskGroup
|
||||
function COMMANDCENTER:MessageToGroup( Message, TaskGroup )
|
||||
|
||||
self:GetPositionable():MessageToGroup( Message, 15, TaskGroup, self:GetName() )
|
||||
self:GetPositionable():MessageToGroup( Message, 15, TaskGroup, self:GetShortText() )
|
||||
|
||||
end
|
||||
|
||||
@ -371,7 +389,7 @@ end
|
||||
-- @param Core.Message#MESSAGE.MessageType MessageType The type of the message, resulting in automatic time duration and prefix of the message.
|
||||
function COMMANDCENTER:MessageTypeToGroup( Message, TaskGroup, MessageType )
|
||||
|
||||
self:GetPositionable():MessageTypeToGroup( Message, MessageType, TaskGroup, self:GetName() )
|
||||
self:GetPositionable():MessageTypeToGroup( Message, MessageType, TaskGroup, self:GetShortText() )
|
||||
|
||||
end
|
||||
|
||||
|
||||
@ -271,16 +271,33 @@ end
|
||||
-- @param #string To
|
||||
function MISSION:onenterCOMPLETED( From, Event, To )
|
||||
|
||||
self:GetCommandCenter():MessageTypeToCoalition( self:GetName() .. " has been completed! Good job guys!", MESSAGE.Type.Information )
|
||||
self:GetCommandCenter():MessageTypeToCoalition( self:GetText() .. " has been completed! Good job guys!", MESSAGE.Type.Information )
|
||||
end
|
||||
|
||||
--- Gets the mission name.
|
||||
-- @param #MISSION self
|
||||
-- @return #MISSION self
|
||||
function MISSION:GetName()
|
||||
return self.Name
|
||||
end
|
||||
|
||||
|
||||
--- Gets the mission text.
|
||||
-- @param #MISSION self
|
||||
-- @return #MISSION self
|
||||
function MISSION:GetText()
|
||||
return string.format( 'Mission "%s (%s)"', self.Name, self.MissionPriority )
|
||||
end
|
||||
|
||||
|
||||
--- Gets the short mission text.
|
||||
-- @param #MISSION self
|
||||
-- @return #MISSION self
|
||||
function MISSION:GetShortText()
|
||||
return string.format( 'Mission "%s"', self.Name )
|
||||
end
|
||||
|
||||
|
||||
--- Add a Unit to join the Mission.
|
||||
-- For each Task within the Mission, the Unit is joined with the Task.
|
||||
-- If the Unit was not part of a Task in the Mission, false is returned.
|
||||
@ -490,10 +507,10 @@ function MISSION:GetRootMenu( TaskGroup ) -- R2.2
|
||||
local CommandCenter = self:GetCommandCenter()
|
||||
local CommandCenterMenu = CommandCenter:GetMenu()
|
||||
|
||||
local MissionName = self:GetName()
|
||||
local MissionName = self:GetText()
|
||||
--local MissionMenu = CommandCenterMenu:GetMenu( MissionName )
|
||||
|
||||
self.MissionMenu = MENU_COALITION:New( self.MissionCoalition, self:GetName(), CommandCenterMenu )
|
||||
self.MissionMenu = MENU_COALITION:New( self.MissionCoalition, MissionName, CommandCenterMenu )
|
||||
|
||||
return self.MissionMenu
|
||||
end
|
||||
@ -506,7 +523,6 @@ function MISSION:GetMenu( TaskGroup ) -- R2.1 -- Changed Menu Structure
|
||||
local CommandCenter = self:GetCommandCenter()
|
||||
local CommandCenterMenu = CommandCenter:GetMenu()
|
||||
|
||||
local MissionName = self:GetName()
|
||||
--local MissionMenu = CommandCenterMenu:GetMenu( MissionName )
|
||||
|
||||
self.MissionGroupMenu = self.MissionGroupMenu or {}
|
||||
@ -514,9 +530,11 @@ function MISSION:GetMenu( TaskGroup ) -- R2.1 -- Changed Menu Structure
|
||||
|
||||
local GroupMenu = self.MissionGroupMenu[TaskGroup]
|
||||
|
||||
CommandCenterMenu = MENU_GROUP:New( TaskGroup, "Command Center (" .. CommandCenter:GetName() .. ")" )
|
||||
local CommandCenterText = CommandCenter:GetText()
|
||||
CommandCenterMenu = MENU_GROUP:New( TaskGroup, CommandCenterText )
|
||||
|
||||
self.MissionMenu = MENU_GROUP:New( TaskGroup, self:GetName(), CommandCenterMenu )
|
||||
local MissionText = self:GetText()
|
||||
self.MissionMenu = MENU_GROUP:New( TaskGroup, MissionText, CommandCenterMenu )
|
||||
|
||||
GroupMenu.BriefingMenu = MENU_GROUP_COMMAND:New( TaskGroup, "Mission Briefing", self.MissionMenu, self.MenuReportBriefing, self, TaskGroup )
|
||||
|
||||
@ -711,7 +729,7 @@ function MISSION:ReportBriefing()
|
||||
local Report = REPORT:New()
|
||||
|
||||
-- List the name of the mission.
|
||||
local Name = self:GetName()
|
||||
local Name = self:GetText()
|
||||
|
||||
-- Determine the status of the mission.
|
||||
local Status = "<" .. self:GetState() .. ">"
|
||||
@ -744,7 +762,7 @@ function MISSION:ReportSummary()
|
||||
local Report = REPORT:New()
|
||||
|
||||
-- List the name of the mission.
|
||||
local Name = self:GetName()
|
||||
local Name = self:GetText()
|
||||
|
||||
-- Determine the status of the mission.
|
||||
local Status = "<" .. self:GetState() .. ">"
|
||||
@ -792,7 +810,7 @@ function MISSION:ReportPlayersPerTask( ReportGroup )
|
||||
local Report = REPORT:New()
|
||||
|
||||
-- List the name of the mission.
|
||||
local Name = self:GetName()
|
||||
local Name = self:GetText()
|
||||
|
||||
-- Determine the status of the mission.
|
||||
local Status = "<" .. self:GetState() .. ">"
|
||||
@ -833,7 +851,7 @@ function MISSION:ReportPlayersProgress( ReportGroup )
|
||||
local Report = REPORT:New()
|
||||
|
||||
-- List the name of the mission.
|
||||
local Name = self:GetName()
|
||||
local Name = self:GetText()
|
||||
|
||||
-- Determine the status of the mission.
|
||||
local Status = "<" .. self:GetState() .. ">"
|
||||
@ -878,7 +896,7 @@ function MISSION:MarkTargetLocations( ReportGroup )
|
||||
local Report = REPORT:New()
|
||||
|
||||
-- List the name of the mission.
|
||||
local Name = self:GetName()
|
||||
local Name = self:GetText()
|
||||
|
||||
-- Determine the status of the mission.
|
||||
local Status = "<" .. self:GetState() .. ">"
|
||||
@ -904,7 +922,7 @@ function MISSION:ReportSummary( ReportGroup )
|
||||
local Report = REPORT:New()
|
||||
|
||||
-- List the name of the mission.
|
||||
local Name = self:GetName()
|
||||
local Name = self:GetText()
|
||||
|
||||
-- Determine the status of the mission.
|
||||
local Status = "<" .. self:GetState() .. ">"
|
||||
@ -930,7 +948,7 @@ function MISSION:ReportOverview( ReportGroup, TaskStatus )
|
||||
local Report = REPORT:New()
|
||||
|
||||
-- List the name of the mission.
|
||||
local Name = self:GetName()
|
||||
local Name = self:GetText()
|
||||
|
||||
-- Determine the status of the mission.
|
||||
local Status = "<" .. self:GetState() .. ">"
|
||||
@ -962,7 +980,7 @@ function MISSION:ReportDetails( ReportGroup )
|
||||
local Report = REPORT:New()
|
||||
|
||||
-- List the name of the mission.
|
||||
local Name = self:GetName()
|
||||
local Name = self:GetText()
|
||||
|
||||
-- Determine the status of the mission.
|
||||
local Status = "<" .. self:GetState() .. ">"
|
||||
|
||||
@ -511,7 +511,7 @@ do -- TASK_A2A_DISPATCHER
|
||||
if not DetectedItem then
|
||||
local TaskText = Task:GetName()
|
||||
for TaskGroupID, TaskGroup in pairs( self.SetGroup:GetSet() ) do
|
||||
Mission:GetCommandCenter():MessageToGroup( string.format( "Obsolete A2A task %s for %s removed.", TaskText, Mission:GetName() ), TaskGroup )
|
||||
Mission:GetCommandCenter():MessageToGroup( string.format( "Obsolete A2A task %s for %s removed.", TaskText, Mission:GetShortText() ), TaskGroup )
|
||||
end
|
||||
Task = self:RemoveTask( TaskIndex )
|
||||
end
|
||||
@ -586,7 +586,7 @@ do -- TASK_A2A_DISPATCHER
|
||||
|
||||
for TaskGroupID, TaskGroup in pairs( self.SetGroup:GetSet() ) do
|
||||
if ( not Mission:IsGroupAssigned(TaskGroup) ) and TaskText ~= "" then
|
||||
Mission:GetCommandCenter():MessageToGroup( string.format( "%s has tasks %s. Subscribe to a task using the radio menu.", Mission:GetName(), TaskText ), TaskGroup )
|
||||
Mission:GetCommandCenter():MessageToGroup( string.format( "%s has tasks %s. Subscribe to a task using the radio menu.", Mission:GetShortText(), TaskText ), TaskGroup )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -47,11 +47,34 @@ do -- TASK_A2G_DISPATCHER
|
||||
-- This chapters provides some insights in the tactical situations when certain Task Types are created.
|
||||
-- The Task Types are depending on the enemy positions that were detected, and the current location of friendly units.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- In the demonstration mission [TAD-A2G-000 - AREAS - Detection test],
|
||||
-- the tactical situation is a demonstration how the A2G detection works.
|
||||
-- This example will be taken further in the explanation in the following chapters.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- The red coalition are the players, the blue coalition is the enemy.
|
||||
--
|
||||
-- Red reconnaissance vehicles and airborne units are detecting the targets.
|
||||
-- We call this the RecceSet as explained above, which is a Set of Groups that
|
||||
-- have a group name starting with `Recce` (configured in the mission script).
|
||||
--
|
||||
-- Red attack units are responsible for executing the mission for the command center.
|
||||
-- We call this the AttackSet, which is a Set of Groups with a group name starting with `Attack` (configured in the mission script).
|
||||
-- These units are setup in this demonstration mission to be ground vehicles and airplanes.
|
||||
-- For demonstration purposes, the attack airplane is stationed on the ground to explain
|
||||
-- the messages and the menus properly.
|
||||
-- Further test missions demonstrate the A2G task dispatcher from within air.
|
||||
--
|
||||
-- Depending upon the detection results, the A2G dispatcher will create different tasks.
|
||||
--
|
||||
-- # 0.1. SEAD Task
|
||||
--
|
||||
-- A SEAD Task is dispatched when there are ground based Radar Emitters detected within an area.
|
||||
--
|
||||
-- 
|
||||
-- 
|
||||
--
|
||||
-- - Once all Radar Emitting Units have been destroyed, the Task will convert into a BAI or CAS task!
|
||||
-- - A CAS and BAI task may be converted into a SEAD task, once a radar has been detected within the area!
|
||||
@ -60,7 +83,7 @@ do -- TASK_A2G_DISPATCHER
|
||||
--
|
||||
-- A CAS Task is dispatched when there are no ground based Radar Emitters within the area, but there are friendly ground Units within 6 km from the enemy.
|
||||
--
|
||||
-- 
|
||||
-- 
|
||||
--
|
||||
-- - After the detection of the CAS task, if the friendly Units are destroyed, the CAS task will convert into a BAI task!
|
||||
-- - Only ground Units are taken into account. Airborne units are ships are not considered friendlies that require Close Air Support.
|
||||
@ -69,7 +92,7 @@ do -- TASK_A2G_DISPATCHER
|
||||
--
|
||||
-- A BAI Task is dispatched when there are no ground based Radar Emitters within the area, and there aren't friendly ground Units within 6 km from the enemy.
|
||||
--
|
||||
-- 
|
||||
-- 
|
||||
--
|
||||
-- - A BAI task may be converted into a CAS task if friendly Ground Units approach within 6 km range!
|
||||
--
|
||||
@ -83,16 +106,15 @@ do -- TASK_A2G_DISPATCHER
|
||||
--
|
||||
-- Radio MENU Structure (F10. Other)
|
||||
--
|
||||
-- F1. Command Center |Gori|
|
||||
-- F1. Mission "Alpha"
|
||||
-- F2. Mission "Beta"
|
||||
-- F3. Mission "Gamma"
|
||||
-- F1. Command Center |Gudauta|
|
||||
-- F1. Mission "Overlord"
|
||||
-- F2. Mission "Desert Storm"
|
||||
-- F1. Command Center [Gori]
|
||||
-- F1. Mission "Alpha (Primary)"
|
||||
-- F2. Mission "Beta (Secondary)"
|
||||
-- F3. Mission "Gamma (Tactical)"
|
||||
-- F1. Command Center [Lima]
|
||||
-- F1. Mission "Overlord (High)"
|
||||
--
|
||||
-- CC |Gori| is controlling Mission "Alpha", "Beta", "Gamma".
|
||||
-- CC |Gudauta| is controlling Missions "Overlord" and "Desert Storm".
|
||||
-- Command Center [Gori] is controlling Mission "Alpha", "Beta", "Gamma". Alpha is the Primary mission, Beta the Secondary and there is a Tacical mission Gamma.
|
||||
-- Command Center [Lima] is controlling Missions "Overlord", which needs to be executed with High priority.
|
||||
--
|
||||
-- ## 1.1. Mission Menu (Under the Command Center Menu)
|
||||
--
|
||||
@ -103,19 +125,18 @@ do -- TASK_A2G_DISPATCHER
|
||||
-- - **Create Task Reports**: A menu to create various reports of the current tasks dispatched by the A2G dispatcher.
|
||||
-- - **Create Mission Reports**: A menu to create various reports on the current mission.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- For CC |Gori|, Mission "Alpha", the menu structure could look like this:
|
||||
-- For CC [Lima], Mission "Overlord", the menu structure could look like this:
|
||||
--
|
||||
-- Radio MENU Structure (F10. Other)
|
||||
--
|
||||
-- F1. Command Center |Gori|
|
||||
-- F1. Mission "Alpha"
|
||||
-- F1. Command Center [Lima]
|
||||
-- F1. Mission "Overlord"
|
||||
-- F1. Mission Briefing
|
||||
-- F2. Mark Task Locations on Map
|
||||
-- F3. Task Reports
|
||||
-- F4. Mission Reports
|
||||
--
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- ### 1.1.1. Mission Briefing Menu
|
||||
--
|
||||
@ -143,11 +164,11 @@ do -- TASK_A2G_DISPATCHER
|
||||
--
|
||||
-- The information shown of the tasks will vary according the underlying task type, but are self explanatory.
|
||||
--
|
||||
-- For CC |Gori|, Mission "Alpha", the Task Reports menu structure could look like this:
|
||||
-- For CC [Gori], Mission "Alpha", the Task Reports menu structure could look like this:
|
||||
--
|
||||
-- Radio MENU Structure (F10. Other)
|
||||
--
|
||||
-- F1. Command Center |Gori|
|
||||
-- F1. Command Center [Gori]
|
||||
-- F1. Mission "Alpha"
|
||||
-- F1. Mission Briefing
|
||||
-- F2. Mark Task Locations on Map
|
||||
@ -173,7 +194,7 @@ do -- TASK_A2G_DISPATCHER
|
||||
--
|
||||
-- Radio MENU Structure (F10. Other)
|
||||
--
|
||||
-- F1. Command Center |Gori|
|
||||
-- F1. Command Center [Gori]
|
||||
-- F1. Mission "Alpha"
|
||||
-- F1. Mission Briefing
|
||||
-- F2. Mark Task Locations on Map
|
||||
@ -200,7 +221,7 @@ do -- TASK_A2G_DISPATCHER
|
||||
--
|
||||
-- Radio MENU Structure (F10. Other)
|
||||
--
|
||||
-- F1. Command Center |Gori|
|
||||
-- F1. Command Center [Gori]
|
||||
-- F1. Mission "Alpha"
|
||||
-- F1. Mission Briefing
|
||||
-- F2. Mark Task Locations on Map
|
||||
@ -224,7 +245,7 @@ do -- TASK_A2G_DISPATCHER
|
||||
--
|
||||
-- Radio MENU Structure (F10. Other)
|
||||
--
|
||||
-- F1. Command Center |Gori|
|
||||
-- F1. Command Center [Gori]
|
||||
-- F1. Mission "Alpha"
|
||||
-- F1. Mission Briefing
|
||||
-- F2. Mark Task Locations on Map
|
||||
@ -240,7 +261,7 @@ do -- TASK_A2G_DISPATCHER
|
||||
-- The Join Planned Task Menu contains the different Planned A2G Tasks **in a structured Menu Hierarchy**.
|
||||
-- The Menu Hierarchy is structuring the Tasks per **Task Type**, and then by **Task Name (ID)**.
|
||||
--
|
||||
-- For example, for CC |Gori|, Mission "Alpha",
|
||||
-- For example, for CC [Gori], Mission "Alpha",
|
||||
-- if a Mission "ALpha" contains 5 Planned Tasks, which would be:
|
||||
--
|
||||
-- - 2 CAS Tasks
|
||||
@ -251,34 +272,29 @@ do -- TASK_A2G_DISPATCHER
|
||||
--
|
||||
-- Radio MENU Structure (F10. Other)
|
||||
--
|
||||
-- F1. Command Center |Gori|
|
||||
-- F1. Command Center [Gori]
|
||||
-- F1. Mission "Alpha"
|
||||
-- F1. Mission Briefing
|
||||
-- F2. Mark Task Locations on Map
|
||||
-- F3. Task Reports
|
||||
-- F4. Mission Reports
|
||||
-- F5. Join Planned Task
|
||||
-- F1. CAS
|
||||
-- F1. CAS.001
|
||||
-- F2. CAS.002
|
||||
-- F2. BAI
|
||||
-- F1. BAI.001
|
||||
-- F1. CAS
|
||||
-- F1. CAS.002
|
||||
-- F3. SEAD
|
||||
-- F1. SEAD.001
|
||||
-- F2. SEAD.002
|
||||
-- F1. SEAD.003
|
||||
-- F2. SEAD.004
|
||||
-- F3. SEAD.005
|
||||
--
|
||||
-- An example from within a running simulation:
|
||||
--
|
||||
-- 
|
||||
-- 
|
||||
--
|
||||
-- Each Task Type Menu would have a list of the Task Menus underneath.
|
||||
-- Each Task Menu (eg. `CAS.001`) has a **detailed Task Menu structure to control the specific task**!
|
||||
--
|
||||
-- An example from within a running simulation:
|
||||
--
|
||||
-- 
|
||||
--
|
||||
--
|
||||
-- ### 1.3.1. Planned Task Menu
|
||||
--
|
||||
-- Each Planned Task Menu will allow for the following actions:
|
||||
@ -306,10 +322,6 @@ do -- TASK_A2G_DISPATCHER
|
||||
--
|
||||
-- **The Join Task is THE menu option to let a Player join the Task, and to engage within the Mission.**
|
||||
--
|
||||
-- An example from within a running simulation:
|
||||
--
|
||||
-- 
|
||||
--
|
||||
--
|
||||
-- ## 1.4. Assigned Task Menu
|
||||
--
|
||||
@ -337,13 +349,29 @@ do -- TASK_A2G_DISPATCHER
|
||||
-- Task abortion will result in the Task to be Cancelled, and the Task **may** be **Replanned**.
|
||||
-- However, this will depend on the setup of each Mission.
|
||||
--
|
||||
-- ## 1.5. Messages
|
||||
--
|
||||
-- During game play, different messages are displayed.
|
||||
-- These messages provide an update of the achievements made, and the state wherein the task is.
|
||||
--
|
||||
-- # 1. TASK_A2G_DISPATCHER constructor
|
||||
-- The various reports can be used also to retrieve the current status of the mission and its tasks.
|
||||
--
|
||||
-- 
|
||||
--
|
||||
-- The @{Settings} menu provides additional options to control the timing of the messages.
|
||||
-- There are:
|
||||
--
|
||||
-- - Status messages, which are quick status updates. The settings menu allows to switch off these messages.
|
||||
-- - Information messages, which are shown a bit longer, as they contain important information.
|
||||
-- - Summary reports, which are quick reports showing a high level summary.
|
||||
-- - Overview reports, which are providing the essential information. It provides an overview of a greater thing, and may take a bit of time to read.
|
||||
-- - Detailed reports, which provide with very detailed information. It takes a bit longer to read those reports, so the display of those could be a bit longer.
|
||||
--
|
||||
-- # 2. TASK_A2G_DISPATCHER constructor
|
||||
--
|
||||
-- The @{#TASK_A2G_DISPATCHER.New}() method creates a new TASK_A2G_DISPATCHER instance.
|
||||
--
|
||||
-- # 2. Usage
|
||||
-- # 3. Usage
|
||||
--
|
||||
-- To use the TASK\_A2G\_DISPATCHER class, you need:
|
||||
--
|
||||
@ -579,7 +607,7 @@ do -- TASK_A2G_DISPATCHER
|
||||
if not DetectedItem then
|
||||
local TaskText = Task:GetName()
|
||||
for TaskGroupID, TaskGroup in pairs( self.SetGroup:GetSet() ) do
|
||||
Mission:GetCommandCenter():MessageToGroup( string.format( "Obsolete A2G task %s for %s removed.", TaskText, Mission:GetName() ), TaskGroup )
|
||||
Mission:GetCommandCenter():MessageToGroup( string.format( "Obsolete A2G task %s for %s removed.", TaskText, Mission:GetShortText() ), TaskGroup )
|
||||
end
|
||||
Task = self:RemoveTask( TaskIndex )
|
||||
end
|
||||
@ -751,7 +779,7 @@ do -- TASK_A2G_DISPATCHER
|
||||
local TaskText = TaskReport:Text(", ")
|
||||
for TaskGroupID, TaskGroup in pairs( self.SetGroup:GetSet() ) do
|
||||
if ( not Mission:IsGroupAssigned(TaskGroup) ) and TaskText ~= "" then
|
||||
Mission:GetCommandCenter():MessageToGroup( string.format( "%s has tasks %s. Subscribe to a task using the radio menu.", Mission:GetName(), TaskText ), TaskGroup )
|
||||
Mission:GetCommandCenter():MessageToGroup( string.format( "%s has tasks %s. Subscribe to a task using the radio menu.", Mission:GetShortText(), TaskText ), TaskGroup )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -456,13 +456,12 @@ end
|
||||
-- @param #string Message The message text
|
||||
-- @param #string Name (optional) The Name of the sender. If not provided, the Name is the type of the Positionable.
|
||||
-- @return #string The message text
|
||||
function POSITIONABLE:GetMessageText( Message, Name ) --R2.1 added
|
||||
function POSITIONABLE:GetMessageText( Message, Name )
|
||||
|
||||
local DCSObject = self:GetDCSObject()
|
||||
if DCSObject then
|
||||
Name = Name and ( " (" .. Name .. ")" ) or ""
|
||||
local Callsign = string.format( "%s", self:GetCallsign() ~= "" and self:GetCallsign() or self:GetName() )
|
||||
local MessageText = string.format("[%s%s]: %s", Callsign, Name, Message )
|
||||
local Callsign = string.format( "%s", ( ( Name ~= "" and Name ) or self:GetCallsign() ~= "" and self:GetCallsign() ) or self:GetName() )
|
||||
local MessageText = string.format("%s - %s", Callsign, Message )
|
||||
return MessageText
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user