Merge pull request #652 from FlightControl-Master/Designate

Designate
This commit is contained in:
Sven Van de Velde 2017-08-11 14:50:02 +02:00 committed by GitHub
commit 0aa92372bf
27 changed files with 785 additions and 682 deletions

View File

@ -944,7 +944,7 @@ end
-- @param #string PlayerName -- @param #string PlayerName
-- @return Core.Settings#SETTINGS -- @return Core.Settings#SETTINGS
function DATABASE:GetPlayerSettings( PlayerName ) function DATABASE:GetPlayerSettings( PlayerName )
self:E({PlayerName}) self:F2( { PlayerName } )
return self.PLAYERSETTINGS[PlayerName] return self.PLAYERSETTINGS[PlayerName]
end end
@ -955,7 +955,7 @@ end
-- @param Core.Settings#SETTINGS Settings -- @param Core.Settings#SETTINGS Settings
-- @return Core.Settings#SETTINGS -- @return Core.Settings#SETTINGS
function DATABASE:SetPlayerSettings( PlayerName, Settings ) function DATABASE:SetPlayerSettings( PlayerName, Settings )
self:E({PlayerName, Settings}) self:F2( { PlayerName, Settings } )
self.PLAYERSETTINGS[PlayerName] = Settings self.PLAYERSETTINGS[PlayerName] = Settings
end end

View File

@ -124,6 +124,7 @@ do -- MENU_COMMAND_BASE
-- ---------------------------------------------------------- -- ----------------------------------------------------------
-- The MENU_COMMAND_BASE class defines the main MENU class where other MENU COMMAND_ -- The MENU_COMMAND_BASE class defines the main MENU class where other MENU COMMAND_
-- classes are derived from, in order to set commands. -- classes are derived from, in order to set commands.
--
-- @field #MENU_COMMAND_BASE -- @field #MENU_COMMAND_BASE
MENU_COMMAND_BASE = { MENU_COMMAND_BASE = {
ClassName = "MENU_COMMAND_BASE", ClassName = "MENU_COMMAND_BASE",
@ -137,16 +138,38 @@ do -- MENU_COMMAND_BASE
-- @return #MENU_COMMAND_BASE -- @return #MENU_COMMAND_BASE
function MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments ) function MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments )
local self = BASE:Inherit( self, MENU_BASE:New( MenuText, ParentMenu ) ) local self = BASE:Inherit( self, MENU_BASE:New( MenuText, ParentMenu ) ) -- #MENU_COMMAND_BASE
self.CommandMenuFunction = CommandMenuFunction self:SetCommandMenuFunction( CommandMenuFunction )
self.CommandMenuArguments = CommandMenuArguments self:SetCommandMenuArguments( CommandMenuArguments )
self.MenuCallHandler = function() self.MenuCallHandler = function()
self.CommandMenuFunction( unpack( self.CommandMenuArguments ) ) self.CommandMenuFunction( unpack( self.CommandMenuArguments ) )
end end
return self return self
end end
--- This sets the new command function of a menu,
-- so that if a menu is regenerated, or if command function changes,
-- that the function set for the menu is loosely coupled with the menu itself!!!
-- If the function changes, no new menu needs to be generated if the menu text is the same!!!
-- @param #MENU_COMMAND_BASE
-- @return #MENU_COMMAND_BASE
function MENU_COMMAND_BASE:SetCommandMenuFunction( CommandMenuFunction )
self.CommandMenuFunction = CommandMenuFunction
return self
end
--- This sets the new command arguments of a menu,
-- so that if a menu is regenerated, or if command arguments change,
-- that the arguments set for the menu are loosely coupled with the menu itself!!!
-- If the arguments change, no new menu needs to be generated if the menu text is the same!!!
-- @param #MENU_COMMAND_BASE
-- @return #MENU_COMMAND_BASE
function MENU_COMMAND_BASE:SetCommandMenuArguments( CommandMenuArguments )
self.CommandMenuArguments = CommandMenuArguments
return self
end
end end
@ -257,7 +280,7 @@ do -- MENU_MISSION_COMMAND
self:T( { MenuText, CommandMenuFunction, arg } ) self:T( { MenuText, CommandMenuFunction, arg } )
self.MenuPath = missionCommands.addCommand( MenuText, self.MenuParentPath, self.MenuCallHandler, arg ) self.MenuPath = missionCommands.addCommand( MenuText, self.MenuParentPath, self.MenuCallHandler )
ParentMenu.Menus[self.MenuPath] = self ParentMenu.Menus[self.MenuPath] = self
@ -430,7 +453,7 @@ do -- MENU_COALITION_COMMAND
self:T( { MenuText, CommandMenuFunction, arg } ) self:T( { MenuText, CommandMenuFunction, arg } )
self.MenuPath = missionCommands.addCommandForCoalition( self.MenuCoalition, MenuText, self.MenuParentPath, self.MenuCallHandler, arg ) self.MenuPath = missionCommands.addCommandForCoalition( self.MenuCoalition, MenuText, self.MenuParentPath, self.MenuCallHandler )
ParentMenu.Menus[self.MenuPath] = self ParentMenu.Menus[self.MenuPath] = self
@ -663,7 +686,7 @@ do -- MENU_CLIENT
missionCommands.removeItemForGroup( self.MenuClient:GetClientGroupID(), MenuPath[MenuPathID] ) missionCommands.removeItemForGroup( self.MenuClient:GetClientGroupID(), MenuPath[MenuPathID] )
end end
self.MenuPath = missionCommands.addCommandForGroup( self.MenuClient:GetClientGroupID(), MenuText, MenuParentPath, self.MenuCallHandler, arg ) self.MenuPath = missionCommands.addCommandForGroup( self.MenuClient:GetClientGroupID(), MenuText, MenuParentPath, self.MenuCallHandler )
MenuPath[MenuPathID] = self.MenuPath MenuPath[MenuPathID] = self.MenuPath
if ParentMenu and ParentMenu.Menus then if ParentMenu and ParentMenu.Menus then
@ -817,7 +840,7 @@ do
-- @param MenuTime -- @param MenuTime
-- @param MenuTag A Tag or Key to filter the menus to be refreshed with the Tag set. -- @param MenuTag A Tag or Key to filter the menus to be refreshed with the Tag set.
-- @return #MENU_GROUP self -- @return #MENU_GROUP self
function MENU_GROUP:RemoveSubMenus( MenuTime, Menutag ) function MENU_GROUP:RemoveSubMenus( MenuTime, MenuTag )
--self:F2( { self.MenuPath, MenuTime, self.MenuTime } ) --self:F2( { self.MenuPath, MenuTime, self.MenuTime } )
self:T( { "Removing Group SubMenus:", MenuTime, MenuTag, self.MenuGroup:GetName(), self.MenuPath } ) self:T( { "Removing Group SubMenus:", MenuTime, MenuTag, self.MenuGroup:GetName(), self.MenuPath } )
@ -866,7 +889,7 @@ do
--- @type MENU_GROUP_COMMAND --- @type MENU_GROUP_COMMAND
-- @extends Core.Menu#MENU_BASE -- @extends Core.Menu#MENU_COMMAND_BASE
--- # MENU_GROUP_COMMAND class, extends @{Menu#MENU_COMMAND_BASE} --- # MENU_GROUP_COMMAND class, extends @{Menu#MENU_COMMAND_BASE}
-- --
@ -890,12 +913,14 @@ do
function MENU_GROUP_COMMAND:New( MenuGroup, MenuText, ParentMenu, CommandMenuFunction, ... ) function MENU_GROUP_COMMAND:New( MenuGroup, MenuText, ParentMenu, CommandMenuFunction, ... )
MenuGroup._Menus = MenuGroup._Menus or {} MenuGroup._Menus = MenuGroup._Menus or {}
local Path = ( ParentMenu and ( table.concat( ParentMenu.MenuPath or {}, "@" ) .. "@" .. MenuText ) ) or MenuText local Path = ( ParentMenu and ( table.concat( ParentMenu.MenuPath or {}, "@" ) .. "@" .. MenuText ) ) or MenuText
if MenuGroup._Menus[Path] then if MenuGroup._Menus[Path] then
self = MenuGroup._Menus[Path] self = MenuGroup._Menus[Path]
self:F2( { "Re-using Group Command Menu:", MenuGroup:GetName(), MenuText } ) --self:E( { Path=Path } )
missionCommands.removeItemForGroup( self.MenuGroupID, self.MenuPath ) --self:E( { self.MenuTag, self.MenuTime, "Re-using Group Command Menu:", MenuGroup:GetName(), MenuText } )
self:SetCommandMenuFunction( CommandMenuFunction )
self:SetCommandMenuArguments( arg )
return self
end end
self = BASE:Inherit( self, MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, arg ) ) self = BASE:Inherit( self, MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, arg ) )
@ -903,6 +928,7 @@ do
MenuGroup._Menus[Path] = self MenuGroup._Menus[Path] = self
--end --end
--self:E({Path=Path})
self.Path = Path self.Path = Path
self.MenuGroup = MenuGroup self.MenuGroup = MenuGroup
self.MenuGroupID = MenuGroup:GetID() self.MenuGroupID = MenuGroup:GetID()
@ -910,7 +936,7 @@ do
self.ParentMenu = ParentMenu self.ParentMenu = ParentMenu
self:F( { "Adding Group Command Menu:", MenuGroup = MenuGroup:GetName(), MenuText = MenuText, MenuPath = self.MenuParentPath } ) self:F( { "Adding Group Command Menu:", MenuGroup = MenuGroup:GetName(), MenuText = MenuText, MenuPath = self.MenuParentPath } )
self.MenuPath = missionCommands.addCommandForGroup( self.MenuGroupID, MenuText, self.MenuParentPath, self.MenuCallHandler, arg ) self.MenuPath = missionCommands.addCommandForGroup( self.MenuGroupID, MenuText, self.MenuParentPath, self.MenuCallHandler )
if self.ParentMenu and self.ParentMenu.Menus then if self.ParentMenu and self.ParentMenu.Menus then
self.ParentMenu.Menus[MenuText] = self self.ParentMenu.Menus[MenuText] = self
@ -930,13 +956,14 @@ do
function MENU_GROUP_COMMAND:Remove( MenuTime, MenuTag ) function MENU_GROUP_COMMAND:Remove( MenuTime, MenuTag )
--self:F2( { self.MenuGroupID, self.MenuPath, MenuTime, self.MenuTime } ) --self:F2( { self.MenuGroupID, self.MenuPath, MenuTime, self.MenuTime } )
--self:E( { MenuTag = MenuTag, MenuTime = self.MenuTime, Path = self.Path } )
if not MenuTime or self.MenuTime ~= MenuTime then if not MenuTime or self.MenuTime ~= MenuTime then
if ( not MenuTag ) or ( MenuTag and self.MenuTag and MenuTag == self.MenuTag ) then if ( not MenuTag ) or ( MenuTag and self.MenuTag and MenuTag == self.MenuTag ) then
if self.MenuGroup._Menus[self.Path] then if self.MenuGroup._Menus[self.Path] then
self = self.MenuGroup._Menus[self.Path] self = self.MenuGroup._Menus[self.Path]
missionCommands.removeItemForGroup( self.MenuGroupID, self.MenuPath ) missionCommands.removeItemForGroup( self.MenuGroupID, self.MenuPath )
self:T( { "Removing Group Command Menu:", MenuGroup = self.MenuGroup:GetName(), MenuText = self.MenuText, MenuPath = self.Path } ) --self:E( { "Removing Group Command Menu:", MenuGroup = self.MenuGroup:GetName(), MenuText = self.MenuText, MenuPath = self.Path } )
self.ParentMenu.Menus[self.MenuText] = nil self.ParentMenu.Menus[self.MenuText] = nil
self.ParentMenu.MenuCount = self.ParentMenu.MenuCount - 1 self.ParentMenu.MenuCount = self.ParentMenu.MenuCount - 1

View File

@ -798,7 +798,7 @@ do -- COORDINATE
-- @return #string The coordinate Text in the configured coordinate system. -- @return #string The coordinate Text in the configured coordinate system.
function COORDINATE:ToString( Controllable, Settings, Task ) -- R2.2 function COORDINATE:ToString( Controllable, Settings, Task ) -- R2.2
self:E( { Controllable = Controllable } ) self:F( { Controllable = Controllable and Controllable:GetName() } )
local Settings = Settings or ( Controllable and _DATABASE:GetPlayerSettings( Controllable:GetPlayerName() ) ) or _SETTINGS local Settings = Settings or ( Controllable and _DATABASE:GetPlayerSettings( Controllable:GetPlayerName() ) ) or _SETTINGS

View File

@ -0,0 +1,86 @@
--- The REPORT class
-- @type REPORT
-- @extends Core.Base#BASE
REPORT = {
ClassName = "REPORT",
Title = "",
}
--- Create a new REPORT.
-- @param #REPORT self
-- @param #string Title
-- @return #REPORT
function REPORT:New( Title )
local self = BASE:Inherit( self, BASE:New() ) -- #REPORT
self.Report = {}
self:SetTitle( Title or "" )
self:SetIndent( 3 )
return self
end
--- Has the REPORT Text?
-- @param #REPORT self
-- @return #boolean
function REPORT:HasText() --R2.1
return #self.Report > 0
end
--- Set indent of a REPORT.
-- @param #REPORT self
-- @param #number Indent
-- @return #REPORT
function REPORT:SetIndent( Indent ) --R2.1
self.Indent = Indent
return self
end
--- Add a new line to a REPORT.
-- @param #REPORT self
-- @param #string Text
-- @return #REPORT
function REPORT:Add( Text )
self.Report[#self.Report+1] = Text
return self
end
--- Add a new line to a REPORT.
-- @param #REPORT self
-- @param #string Text
-- @return #REPORT
function REPORT:AddIndent( Text ) --R2.1
self.Report[#self.Report+1] = string.rep(" ", self.Indent ) .. Text:gsub("\n","\n"..string.rep( " ", self.Indent ) )
return self
end
--- Produces the text of the report, taking into account an optional delimeter, which is \n by default.
-- @param #REPORT self
-- @param #string Delimiter (optional) A delimiter text.
-- @return #string The report text.
function REPORT:Text( Delimiter )
Delimiter = Delimiter or "\n"
local ReportText = ( self.Title ~= "" and self.Title .. Delimiter or self.Title ) .. table.concat( self.Report, Delimiter ) or ""
return ReportText
end
--- Sets the title of the report.
-- @param #REPORT self
-- @param #string Title The title of the report.
-- @return #REPORT
function REPORT:SetTitle( Title )
self.Title = Title
return self
end
--- Gets the amount of report items contained in the report.
-- @param #REPORT self
-- @return #number Returns the number of report items contained in the report. 0 is returned if no report items are contained in the report. The title is not counted for.
function REPORT:GetCount()
return #self.Report
end

View File

@ -55,6 +55,7 @@ function SCHEDULEDISPATCHER:AddSchedule( Scheduler, ScheduleFunction, ScheduleAr
self:F2( { Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop } ) self:F2( { Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop } )
self.CallID = self.CallID + 1 self.CallID = self.CallID + 1
local CallID = self.CallID .. "#" .. ( Scheduler.MasterObject and Scheduler.MasterObject:GetClassNameAndID() or "" ) or ""
-- Initialize the ObjectSchedulers array, which is a weakly coupled table. -- Initialize the ObjectSchedulers array, which is a weakly coupled table.
-- If the object used as the key is nil, then the garbage collector will remove the item from the Functions array. -- If the object used as the key is nil, then the garbage collector will remove the item from the Functions array.
@ -65,27 +66,27 @@ function SCHEDULEDISPATCHER:AddSchedule( Scheduler, ScheduleFunction, ScheduleAr
self.ObjectSchedulers = self.ObjectSchedulers or setmetatable( {}, { __mode = "v" } ) self.ObjectSchedulers = self.ObjectSchedulers or setmetatable( {}, { __mode = "v" } )
if Scheduler.MasterObject then if Scheduler.MasterObject then
self.ObjectSchedulers[self.CallID] = Scheduler self.ObjectSchedulers[CallID] = Scheduler
self:F3( { CallID = self.CallID, ObjectScheduler = tostring(self.ObjectSchedulers[self.CallID]), MasterObject = tostring(Scheduler.MasterObject) } ) self:F3( { CallID = CallID, ObjectScheduler = tostring(self.ObjectSchedulers[CallID]), MasterObject = tostring(Scheduler.MasterObject) } )
else else
self.PersistentSchedulers[self.CallID] = Scheduler self.PersistentSchedulers[CallID] = Scheduler
self:F3( { CallID = self.CallID, PersistentScheduler = self.PersistentSchedulers[self.CallID] } ) self:F3( { CallID = CallID, PersistentScheduler = self.PersistentSchedulers[CallID] } )
end end
self.Schedule = self.Schedule or setmetatable( {}, { __mode = "k" } ) self.Schedule = self.Schedule or setmetatable( {}, { __mode = "k" } )
self.Schedule[Scheduler] = self.Schedule[Scheduler] or {} self.Schedule[Scheduler] = self.Schedule[Scheduler] or {}
self.Schedule[Scheduler][self.CallID] = {} self.Schedule[Scheduler][CallID] = {}
self.Schedule[Scheduler][self.CallID].Function = ScheduleFunction self.Schedule[Scheduler][CallID].Function = ScheduleFunction
self.Schedule[Scheduler][self.CallID].Arguments = ScheduleArguments self.Schedule[Scheduler][CallID].Arguments = ScheduleArguments
self.Schedule[Scheduler][self.CallID].StartTime = timer.getTime() + ( Start or 0 ) self.Schedule[Scheduler][CallID].StartTime = timer.getTime() + ( Start or 0 )
self.Schedule[Scheduler][self.CallID].Start = Start + .1 self.Schedule[Scheduler][CallID].Start = Start + .1
self.Schedule[Scheduler][self.CallID].Repeat = Repeat or 0 self.Schedule[Scheduler][CallID].Repeat = Repeat or 0
self.Schedule[Scheduler][self.CallID].Randomize = Randomize or 0 self.Schedule[Scheduler][CallID].Randomize = Randomize or 0
self.Schedule[Scheduler][self.CallID].Stop = Stop self.Schedule[Scheduler][CallID].Stop = Stop
self:T3( self.Schedule[Scheduler][self.CallID] ) self:T3( self.Schedule[Scheduler][CallID] )
self.Schedule[Scheduler][self.CallID].CallHandler = function( CallID ) self.Schedule[Scheduler][CallID].CallHandler = function( CallID )
self:F2( CallID ) self:F2( CallID )
local ErrorHandler = function( errmsg ) local ErrorHandler = function( errmsg )
@ -164,9 +165,9 @@ function SCHEDULEDISPATCHER:AddSchedule( Scheduler, ScheduleFunction, ScheduleAr
return nil return nil
end end
self:Start( Scheduler, self.CallID ) self:Start( Scheduler, CallID )
return self.CallID return CallID
end end
function SCHEDULEDISPATCHER:RemoveSchedule( Scheduler, CallID ) function SCHEDULEDISPATCHER:RemoveSchedule( Scheduler, CallID )

View File

@ -82,7 +82,6 @@ do -- SETTINGS
-- @param #SETTINGS self -- @param #SETTINGS self
-- @return #boolean true if metric. -- @return #boolean true if metric.
function SETTINGS:IsMetric() function SETTINGS:IsMetric()
self:E( {Metric = ( self.Metric ~= nil and self.Metric == true ) or ( self.Metric == nil and _SETTINGS:IsMetric() ) } )
return ( self.Metric ~= nil and self.Metric == true ) or ( self.Metric == nil and _SETTINGS:IsMetric() ) return ( self.Metric ~= nil and self.Metric == true ) or ( self.Metric == nil and _SETTINGS:IsMetric() )
end end
@ -96,7 +95,6 @@ do -- SETTINGS
-- @param #SETTINGS self -- @param #SETTINGS self
-- @return #boolean true if imperial. -- @return #boolean true if imperial.
function SETTINGS:IsImperial() function SETTINGS:IsImperial()
self:E( {Metric = ( self.Metric ~= nil and self.Metric == false ) or ( self.Metric == nil and _SETTINGS:IsMetric() ) } )
return ( self.Metric ~= nil and self.Metric == false ) or ( self.Metric == nil and _SETTINGS:IsMetric() ) return ( self.Metric ~= nil and self.Metric == false ) or ( self.Metric == nil and _SETTINGS:IsMetric() )
end end
@ -187,7 +185,6 @@ do -- SETTINGS
-- @param #SETTINGS self -- @param #SETTINGS self
-- @return #boolean true if BRA -- @return #boolean true if BRA
function SETTINGS:IsA2G_BR() function SETTINGS:IsA2G_BR()
self:E( { BRA = ( self.A2GSystem and self.A2GSystem == "BR" ) or ( not self.A2GSystem and _SETTINGS:IsA2G_BR() ) } )
return ( self.A2GSystem and self.A2GSystem == "BR" ) or ( not self.A2GSystem and _SETTINGS:IsA2G_BR() ) return ( self.A2GSystem and self.A2GSystem == "BR" ) or ( not self.A2GSystem and _SETTINGS:IsA2G_BR() )
end end

View File

@ -1,4 +1,4 @@
--- **Functional** -- Management of target **Designation**. --- **Functional** -- Management of target **Designation**. Lase, smoke and illuminate targets.
-- --
-- --![Banner Image](..\Presentations\DESIGNATE\Dia1.JPG) -- --![Banner Image](..\Presentations\DESIGNATE\Dia1.JPG)
-- --
@ -70,10 +70,14 @@ do -- DESIGNATE
-- The RecceSet is continuously detecting for potential Targets, executing its task as part of the DetectionObject. -- The RecceSet is continuously detecting for potential Targets, executing its task as part of the DetectionObject.
-- Once Targets have been detected, the DesignateObject will trigger the **Detect Event**. -- Once Targets have been detected, the DesignateObject will trigger the **Detect Event**.
-- --
-- In order to prevent an overflow in the DesignateObject of detected targets, there is a maximum
-- amount of DetectionItems that can be put in **scope** of the DesignateObject.
-- We call this the **MaximumDesignations** term.
--
-- As part of the Detect Event, the DetectionItems list is used by the DesignateObject to provide the Players with: -- As part of the Detect Event, the DetectionItems list is used by the DesignateObject to provide the Players with:
-- --
-- * The RecceGroups are reporting to each AttackGroup, sending **Messages** containing the Threat Level and the TargetSet composition. -- * The RecceGroups are reporting to each AttackGroup, sending **Messages** containing the Threat Level and the TargetSet composition.
-- * **Menu options** are created and updated for each AttackGroup, containing the Threat Level and the TargetSet composition. -- * **Menu options** are created and updated for each AttackGroup, containing the Detection ID and the Coordinates.
-- --
-- A Player can then select an action from the Designate Menu. -- A Player can then select an action from the Designate Menu.
-- --
@ -109,7 +113,7 @@ do -- DESIGNATE
-- --
-- ### 2.1 DESIGNATE States -- ### 2.1 DESIGNATE States
-- --
-- * **Designating** ( Group ): The process is not started yet. -- * **Designating** ( Group ): The designation process.
-- --
-- ### 2.2 DESIGNATE Events -- ### 2.2 DESIGNATE Events
-- --
@ -119,9 +123,17 @@ do -- DESIGNATE
-- * **@{#DESIGNATE.Smoke}**: Smoke the targets with the specified Index. -- * **@{#DESIGNATE.Smoke}**: Smoke the targets with the specified Index.
-- * **@{#DESIGNATE.Status}**: Report designation status. -- * **@{#DESIGNATE.Status}**: Report designation status.
-- --
-- ## 3. Laser codes -- ## 3. Maximum Designations
-- --
-- ### 3.1 Set possible laser codes -- In order to prevent an overflow of designations due to many Detected Targets, there is a
-- Maximum Designations scope that is set in the DesignationObject.
--
-- The method @{#DESIGNATE.SetMaximumDesignations}() will put a limit on the amount of designations put in scope of the DesignationObject.
-- Using the menu system, the player can "forget" a designation, so that gradually a new designation can be put in scope when detected.
--
-- ## 4. Laser codes
--
-- ### 4.1 Set possible laser codes
-- --
-- An array of laser codes can be provided, that will be used by the DESIGNATE when lasing. -- An array of laser codes can be provided, that will be used by the DESIGNATE when lasing.
-- The laser code is communicated by the Recce when it is lasing a larget. -- The laser code is communicated by the Recce when it is lasing a larget.
@ -139,11 +151,11 @@ do -- DESIGNATE
-- --
-- The above sets a collection of possible laser codes that can be assigned. **Note the { } notation!** -- The above sets a collection of possible laser codes that can be assigned. **Note the { } notation!**
-- --
-- ### 3.2 Auto generate laser codes -- ### 4.2 Auto generate laser codes
-- --
-- Use the method @{#DESIGNATE.GenerateLaserCodes}() to generate all possible laser codes. Logic implemented and advised by Ciribob! -- Use the method @{#DESIGNATE.GenerateLaserCodes}() to generate all possible laser codes. Logic implemented and advised by Ciribob!
-- --
-- ## 4. Autolase to automatically lase detected targets. -- ## 5. Autolase to automatically lase detected targets.
-- --
-- DetectionItems can be auto lased once detected by Recces. As such, there is almost no action required from the Players using the Designate Menu. -- DetectionItems can be auto lased once detected by Recces. As such, there is almost no action required from the Players using the Designate Menu.
-- The **auto lase** function can be activated through the Designation Menu. -- The **auto lase** function can be activated through the Designation Menu.
@ -154,7 +166,7 @@ do -- DESIGNATE
-- --
-- Activate the auto lasing. -- Activate the auto lasing.
-- --
-- ## 5. Target prioritization on threat level -- ## 6. Target prioritization on threat level
-- --
-- Targets can be detected of different types in one DetectionItem. Depending on the type of the Target, a different threat level applies in an Air to Ground combat context. -- Targets can be detected of different types in one DetectionItem. Depending on the type of the Target, a different threat level applies in an Air to Ground combat context.
-- SAMs are of a higher threat than normal tanks. So, if the Target type was recognized, the Recces will select those targets that form the biggest threat first, -- SAMs are of a higher threat than normal tanks. So, if the Target type was recognized, the Recces will select those targets that form the biggest threat first,
@ -372,16 +384,19 @@ do -- DESIGNATE
self:SetMission( Mission ) self:SetMission( Mission )
self:SetDesignateMenu() self:SetDesignateMenu()
self:SetLaserCodes( 1688 ) -- set self.LaserCodes self:SetLaserCodes( { 1688, 1130, 4785, 6547, 1465, 4578 } ) -- set self.LaserCodes
self:SetAutoLase( false ) -- set self.Autolase self:SetAutoLase( false ) -- set self.Autolase
self:SetThreatLevelPrioritization( false ) -- self.ThreatLevelPrioritization, default is threat level priorization off self:SetThreatLevelPrioritization( false ) -- self.ThreatLevelPrioritization, default is threat level priorization off
self:SetMaximumDesignations( 5 ) -- Sets the maximum designations. The default is 5 designations.
self.LaserCodesUsed = {} self.LaserCodesUsed = {}
self.Detection:__Start( 2 ) self.Detection:__Start( 2 )
self:__Detect( -15 )
return self return self
end end
@ -405,6 +420,16 @@ do -- DESIGNATE
end end
--- Set the maximum amount of designations.
-- @param #DESIGNATE self
-- @param #number MaximumDesignations
-- @return #DESIGNATE
function DESIGNATE:SetMaximumDesignations( MaximumDesignations )
self.MaximumDesignations = MaximumDesignations
return self
end
--- Set an array of possible laser codes. --- Set an array of possible laser codes.
-- Each new lase will select a code from this table. -- Each new lase will select a code from this table.
-- @param #DESIGNATE self -- @param #DESIGNATE self
@ -413,7 +438,7 @@ do -- DESIGNATE
function DESIGNATE:SetLaserCodes( LaserCodes ) --R2.1 function DESIGNATE:SetLaserCodes( LaserCodes ) --R2.1
self.LaserCodes = ( type( LaserCodes ) == "table" ) and LaserCodes or { LaserCodes } self.LaserCodes = ( type( LaserCodes ) == "table" ) and LaserCodes or { LaserCodes }
self:E(self.LaserCodes) self:E( { LaserCodes = self.LaserCodes } )
self.LaserCodesUsed = {} self.LaserCodesUsed = {}
@ -490,7 +515,7 @@ do -- DESIGNATE
CC:MessageToSetGroup( "Auto Lase " .. AutoLaseOnOff .. ".", 15, self.AttackSet ) CC:MessageToSetGroup( "Auto Lase " .. AutoLaseOnOff .. ".", 15, self.AttackSet )
end end
self:ActivateAutoLase() self:CoordinateLase()
self:SetDesignateMenu() self:SetDesignateMenu()
return self return self
@ -525,15 +550,93 @@ do -- DESIGNATE
-- @return #DESIGNATE -- @return #DESIGNATE
function DESIGNATE:onafterDetect() function DESIGNATE:onafterDetect()
self:__Detect( -60 ) self:__Detect( -math.random( 60 ) )
self:ActivateAutoLase() self:DesignationScope()
self:CoordinateLase()
self:SendStatus() self:SendStatus()
self:SetDesignateMenu() self:SetDesignateMenu()
return self return self
end end
--- Adapt the designation scope according the detected items.
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:DesignationScope()
local DetectedItems = self.Detection:GetDetectedItems()
local DetectedItemCount = 0
for DesignateIndex, Designating in pairs( self.Designating ) do
local DetectedItem = DetectedItems[DesignateIndex]
if DetectedItem then
-- Check LOS...
local IsDetected = self.Detection:IsDetectedItemDetected( DetectedItem )
self:F({IsDetected = IsDetected, DetectedItem })
if IsDetected == false then
self:F("Removing")
-- This Detection is obsolete, remove from the designate scope
self.Designating[DesignateIndex] = nil
self.AttackSet:ForEachGroup(
function( AttackGroup )
local DetectionText = self.Detection:DetectedItemReportSummary( DesignateIndex, AttackGroup ):Text( ", " )
self.CC:GetPositionable():MessageToGroup( "Targets out of LOS\n" .. DetectionText, 10, AttackGroup, "Designate" )
end
)
else
DetectedItemCount = DetectedItemCount + 1
end
else
-- This Detection is obsolete, remove from the designate scope
self.Designating[DesignateIndex] = nil
end
end
if DetectedItemCount < 5 then
for DesignateIndex, DetectedItem in pairs( DetectedItems ) do
local IsDetected = self.Detection:IsDetectedItemDetected( DetectedItem )
if IsDetected == true then
if self.Designating[DesignateIndex] == nil then
-- ok, we added one item to the designate scope.
self.AttackSet:ForEachGroup(
function( AttackGroup )
local DetectionText = self.Detection:DetectedItemReportSummary( DesignateIndex, AttackGroup ):Text( ", " )
self.CC:GetPositionable():MessageToGroup( "Targets detected at \n" .. DetectionText, 10, AttackGroup, "Designate" )
end
)
self.Designating[DesignateIndex] = ""
break
end
end
end
end
return self
end
--- Coordinates the Auto Lase.
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:CoordinateLase()
local DetectedItems = self.Detection:GetDetectedItems()
for DesignateIndex, Designating in pairs( self.Designating ) do
local DetectedItem = DetectedItems[DesignateIndex]
if DetectedItem then
if self.AutoLase then
self:LaseOn( DesignateIndex, self.LaseDuration )
end
end
end
return self
end
--- Sends the status to the Attack Groups. --- Sends the status to the Attack Groups.
-- @param #DESIGNATE self -- @param #DESIGNATE self
-- @param Wrapper.Group#GROUP AttackGroup -- @param Wrapper.Group#GROUP AttackGroup
@ -550,20 +653,23 @@ do -- DESIGNATE
if self.FlashStatusMenu[AttackGroup] or ( MenuAttackGroup and ( AttackGroup:GetName() == MenuAttackGroup:GetName() ) ) then if self.FlashStatusMenu[AttackGroup] or ( MenuAttackGroup and ( AttackGroup:GetName() == MenuAttackGroup:GetName() ) ) then
local DetectedReport = REPORT:New( "Targets designated:\n" ) local DetectedReport = REPORT:New( "Detected Targets: \n" )
local DetectedItems = self.Detection:GetDetectedItems() local DetectedItems = self.Detection:GetDetectedItems()
for Index, DetectedItemData in pairs( DetectedItems ) do for DesignateIndex, Designating in pairs( self.Designating ) do
local DetectedItem = DetectedItems[DesignateIndex]
local Report = self.Detection:DetectedItemReportSummary( Index, AttackGroup ) if DetectedItem then
DetectedReport:Add(" - " .. Report) local Report = self.Detection:DetectedItemReportSummary( DesignateIndex, AttackGroup ):Text( ", " )
DetectedReport:Add( " - " .. Report )
DetectedReport:Add( string.rep( "-", 140 ) )
end
end end
local CC = self.CC:GetPositionable() local CC = self.CC:GetPositionable()
CC:MessageToGroup( DetectedReport:Text( "\n" ), Duration, AttackGroup ) CC:MessageToGroup( DetectedReport:Text( "\n" ), Duration, AttackGroup )
local DesignationReport = REPORT:New( "Targets marked:\n" ) local DesignationReport = REPORT:New( "Marking Targets:\n" )
self.RecceSet:ForEachGroup( self.RecceSet:ForEachGroup(
function( RecceGroup ) function( RecceGroup )
@ -585,33 +691,6 @@ do -- DESIGNATE
return self return self
end end
--- Coordinates the Auto Lase.
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:ActivateAutoLase()
self.AttackSet:Flush()
self.AttackSet:ForEachGroup(
--- @param Wrapper.Group#GROUP GroupReport
function( AttackGroup )
local DetectedItems = self.Detection:GetDetectedItems()
for Index, DetectedItemData in pairs( DetectedItems ) do
if self.AutoLase then
if not self.Designating[Index] then
self:LaseOn( Index, self.LaseDuration )
end
end
end
end
)
return self
end
--- Sets the Designate Menu. --- Sets the Designate Menu.
-- @param #DESIGNATE self -- @param #DESIGNATE self
-- @return #DESIGNATE -- @return #DESIGNATE
@ -656,32 +735,43 @@ do -- DESIGNATE
local DetectedItems = self.Detection:GetDetectedItems() local DetectedItems = self.Detection:GetDetectedItems()
for Index, DetectedItemData in pairs( DetectedItems ) do local DetectedItemCount = 0
for DesignateIndex, Designating in pairs( self.Designating ) do
local DetectedItem = DetectedItems[DesignateIndex]
if DetectedItem then
local Report = self.Detection:DetectedItemMenu( Index, AttackGroup ) local Coord = self.Detection:GetDetectedItemCoordinate( DesignateIndex )
local ID = self.Detection:GetDetectedItemID( DesignateIndex )
if not self.Designating[Index] then local MenuText = ID .. ", " .. Coord:ToString( AttackGroup )
local DetectedMenu = MENU_GROUP:New( AttackGroup, Report, MenuDesignate )
MENU_GROUP_COMMAND:New( AttackGroup, "Lase target 60 secs", DetectedMenu, self.MenuLaseOn, self, Index, 60 ):SetTime( MenuTime ):SetTag( "Designate" ) if Designating == "" then
MENU_GROUP_COMMAND:New( AttackGroup, "Lase target 120 secs", DetectedMenu, self.MenuLaseOn, self, Index, 120 ):SetTime( MenuTime ):SetTag( "Designate" ) MenuText = "(-) " .. MenuText
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke red", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.Red ):SetTime( MenuTime ):SetTag( "Designate" ) local DetectedMenu = MENU_GROUP:New( AttackGroup, MenuText, MenuDesignate ):SetTime( MenuTime ):SetTag( "Designate" )
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke blue", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.Blue ):SetTime( MenuTime ):SetTag( "Designate" ) MENU_GROUP_COMMAND:New( AttackGroup, "Search other target", DetectedMenu, self.MenuForget, self, DesignateIndex ):SetTime( MenuTime ):SetTag( "Designate" )
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke green", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.Green ):SetTime( MenuTime ):SetTag( "Designate" ) MENU_GROUP_COMMAND:New( AttackGroup, "Lase target 60 secs", DetectedMenu, self.MenuLaseOn, self, DesignateIndex, 60 ):SetTime( MenuTime ):SetTag( "Designate" )
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke white", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.White ):SetTime( MenuTime ):SetTag( "Designate" ) MENU_GROUP_COMMAND:New( AttackGroup, "Lase target 120 secs", DetectedMenu, self.MenuLaseOn, self, DesignateIndex, 120 ):SetTime( MenuTime ):SetTag( "Designate" )
MENU_GROUP_COMMAND:New( AttackGroup, "Smoke orange", DetectedMenu, self.MenuSmoke, self, Index, SMOKECOLOR.Orange ):SetTime( MenuTime ):SetTag( "Designate" ) MENU_GROUP_COMMAND:New( AttackGroup, "Smoke red", DetectedMenu, self.MenuSmoke, self, DesignateIndex, SMOKECOLOR.Red ):SetTime( MenuTime ):SetTag( "Designate" )
MENU_GROUP_COMMAND:New( AttackGroup, "Illuminate", DetectedMenu, self.MenuIlluminate, self, Index ):SetTime( MenuTime ):SetTag( "Designate" ) MENU_GROUP_COMMAND:New( AttackGroup, "Smoke blue", DetectedMenu, self.MenuSmoke, self, DesignateIndex, SMOKECOLOR.Blue ):SetTime( MenuTime ):SetTag( "Designate" )
else MENU_GROUP_COMMAND:New( AttackGroup, "Smoke green", DetectedMenu, self.MenuSmoke, self, DesignateIndex, SMOKECOLOR.Green ):SetTime( MenuTime ):SetTag( "Designate" )
if self.Designating[Index] == "Laser" then MENU_GROUP_COMMAND:New( AttackGroup, "Smoke white", DetectedMenu, self.MenuSmoke, self, DesignateIndex, SMOKECOLOR.White ):SetTime( MenuTime ):SetTag( "Designate" )
Report = "Lasing " .. Report MENU_GROUP_COMMAND:New( AttackGroup, "Smoke orange", DetectedMenu, self.MenuSmoke, self, DesignateIndex, SMOKECOLOR.Orange ):SetTime( MenuTime ):SetTag( "Designate" )
elseif self.Designating[Index] == "Smoke" then MENU_GROUP_COMMAND:New( AttackGroup, "Illuminate", DetectedMenu, self.MenuIlluminate, self, DesignateIndex ):SetTime( MenuTime ):SetTag( "Designate" )
Report = "Smoking " .. Report
elseif self.Designating[Index] == "Illuminate" then
Report = "Illuminating " .. Report
end
local DetectedMenu = MENU_GROUP:New( AttackGroup, Report, MenuDesignate ):SetTime( MenuTime ):SetTag( "Designate" )
if self.Designating[Index] == "Laser" then
MENU_GROUP_COMMAND:New( AttackGroup, "Stop lasing", DetectedMenu, self.MenuLaseOff, self, Index ):SetTime( MenuTime ):SetTag( "Designate" )
else else
if Designating == "Laser" then
MenuText = "(L) " .. MenuText
elseif Designating == "Smoke" then
MenuText = "(S) " .. MenuText
elseif Designating == "Illuminate" then
MenuText = "(I) " .. MenuText
end
local DetectedMenu = MENU_GROUP:New( AttackGroup, MenuText, MenuDesignate ):SetTime( MenuTime ):SetTag( "Designate" )
if Designating == "Laser" then
MENU_GROUP_COMMAND:New( AttackGroup, "Stop lasing", DetectedMenu, self.MenuLaseOff, self, DesignateIndex ):SetTime( MenuTime ):SetTag( "Designate" )
else
end
end end
end end
end end
@ -712,6 +802,16 @@ do -- DESIGNATE
end end
---
-- @param #DESIGNATE self
function DESIGNATE:MenuForget( Index )
self:E("Forget")
self.Designating[Index] = nil
self:SetDesignateMenu()
end
--- ---
-- @param #DESIGNATE self -- @param #DESIGNATE self
function DESIGNATE:MenuAutoLase( AutoLase ) function DESIGNATE:MenuAutoLase( AutoLase )
@ -728,7 +828,7 @@ do -- DESIGNATE
self:E("Designate through Smoke") self:E("Designate through Smoke")
self.Designating[Index] = "Smoke" self.Designating[Index] = "Smoke"
self:__Smoke( 1, Index, Color ) self:Smoke( Index, Color )
end end
--- ---
@ -749,6 +849,7 @@ do -- DESIGNATE
self:E("Designate through Lase") self:E("Designate through Lase")
self:__LaseOn( 1, Index, Duration ) self:__LaseOn( 1, Index, Duration )
self:SetDesignateMenu()
end end
--- ---
@ -757,8 +858,9 @@ do -- DESIGNATE
self:E("Lasing off") self:E("Lasing off")
self.Designating[Index] = nil self.Designating[Index] = ""
self:__LaseOff( 1, Index ) self:__LaseOff( 1, Index )
self:SetDesignateMenu()
end end
--- ---
@ -779,10 +881,13 @@ do -- DESIGNATE
TargetSetUnit:Flush() TargetSetUnit:Flush()
--self:F( { Recces = self.Recces } )
for TargetUnit, RecceData in pairs( self.Recces ) do for TargetUnit, RecceData in pairs( self.Recces ) do
local Recce = RecceData -- Wrapper.Unit#UNIT local Recce = RecceData -- Wrapper.Unit#UNIT
self:F( { TargetUnit = TargetUnit, Recce = Recce:GetName() } )
if not Recce:IsLasing() then if not Recce:IsLasing() then
local LaserCode = Recce:GetLaserCode() --(Not deleted when stopping with lasing). local LaserCode = Recce:GetLaserCode() --(Not deleted when stopping with lasing).
self:F( { ClearingLaserCode = LaserCode } )
self.LaserCodesUsed[LaserCode] = nil self.LaserCodesUsed[LaserCode] = nil
self.Recces[TargetUnit] = nil self.Recces[TargetUnit] = nil
end end
@ -791,17 +896,22 @@ do -- DESIGNATE
TargetSetUnit:ForEachUnitPerThreatLevel( 10, 0, TargetSetUnit:ForEachUnitPerThreatLevel( 10, 0,
--- @param Wrapper.Unit#UNIT SmokeUnit --- @param Wrapper.Unit#UNIT SmokeUnit
function( TargetUnit ) function( TargetUnit )
self:E("In procedure") self:F( { TargetUnit = TargetUnit:GetName() } )
if TargetUnit:IsAlive() then if TargetUnit:IsAlive() then
local Recce = self.Recces[TargetUnit] local Recce = self.Recces[TargetUnit]
if not Recce then if not Recce then
self.RecceSet:Flush()
for RecceGroupID, RecceGroup in pairs( self.RecceSet:GetSet() ) do for RecceGroupID, RecceGroup in pairs( self.RecceSet:GetSet() ) do
for UnitID, UnitData in pairs( RecceGroup:GetUnits() or {} ) do for UnitID, UnitData in pairs( RecceGroup:GetUnits() or {} ) do
local RecceUnit = UnitData -- Wrapper.Unit#UNIT local RecceUnit = UnitData -- Wrapper.Unit#UNIT
local RecceUnitDesc = RecceUnit:GetDesc()
--self:F( { RecceUnit = RecceUnit:GetName(), RecceDescription = RecceUnitDesc } )
if RecceUnit:IsLasing() == false then if RecceUnit:IsLasing() == false then
--self:F( { IsDetected = RecceUnit:IsDetected( TargetUnit ), IsLOS = RecceUnit:IsLOS( TargetUnit ) } )
if RecceUnit:IsDetected( TargetUnit ) and RecceUnit:IsLOS( TargetUnit ) then if RecceUnit:IsDetected( TargetUnit ) and RecceUnit:IsLOS( TargetUnit ) then
local LaserCodeIndex = math.random( 1, #self.LaserCodes ) local LaserCodeIndex = math.random( 1, #self.LaserCodes )
local LaserCode = self.LaserCodes[LaserCodeIndex] local LaserCode = self.LaserCodes[LaserCodeIndex]
--self:F( { LaserCode = LaserCode, LaserCodeUsed = self.LaserCodesUsed[LaserCode] } )
if not self.LaserCodesUsed[LaserCode] then if not self.LaserCodesUsed[LaserCode] then
self.LaserCodesUsed[LaserCode] = LaserCodeIndex self.LaserCodesUsed[LaserCode] = LaserCodeIndex
local Spot = RecceUnit:LaseUnit( TargetUnit, LaserCode, Duration ) local Spot = RecceUnit:LaseUnit( TargetUnit, LaserCode, Duration )
@ -812,7 +922,8 @@ do -- DESIGNATE
end end
self.Recces[TargetUnit] = RecceUnit self.Recces[TargetUnit] = RecceUnit
RecceUnit:MessageToSetGroup( "Marking " .. TargetUnit:GetTypeName() .. " with laser " .. RecceUnit:GetSpot().LaserCode .. " for " .. Duration .. "s.", 5, self.AttackSet ) RecceUnit:MessageToSetGroup( "Marking " .. TargetUnit:GetTypeName() .. " with laser " .. RecceUnit:GetSpot().LaserCode .. " for " .. Duration .. "s.", 5, self.AttackSet )
break -- OK. We have assigned for the Recce a TargetUnit. We can exit the function.
return
end end
else else
--RecceUnit:MessageToSetGroup( "Can't mark " .. TargetUnit:GetTypeName(), 5, self.AttackSet ) --RecceUnit:MessageToSetGroup( "Can't mark " .. TargetUnit:GetTypeName(), 5, self.AttackSet )
@ -823,7 +934,7 @@ do -- DESIGNATE
local Recce = self.Recces[TargetUnit] -- Wrapper.Unit#UNIT local Recce = self.Recces[TargetUnit] -- Wrapper.Unit#UNIT
if Recce then if Recce then
Recce:LaseOff() Recce:LaseOff()
Recce:MessageToGroup( "Target " .. TargetUnit:GetTypeName() "out of LOS. Cancelling lase!", 5, self.AttackSet ) Recce:MessageToSetGroup( "Target " .. TargetUnit:GetTypeName() "out of LOS. Cancelling lase!", 5, self.AttackSet )
end end
end end
end end
@ -836,7 +947,7 @@ do -- DESIGNATE
end end
) )
self:__Lasing( 15, Index, Duration ) self:__Lasing( 30, Index, Duration )
self:SetDesignateMenu() self:SetDesignateMenu()
@ -888,10 +999,10 @@ do -- DESIGNATE
local RecceUnit = RecceGroup:GetUnit( 1 ) local RecceUnit = RecceGroup:GetUnit( 1 )
if RecceUnit then if RecceUnit then
RecceUnit:MessageToSetGroup( "Smoking " .. SmokeUnit:GetTypeName() .. ".", 5, self.AttackSet ) RecceUnit:MessageToSetGroup( "Smoking " .. SmokeUnit:GetTypeName() .. ".", 5, self.AttackSet )
SCHEDULER:New( self, SCHEDULER:New( nil,
function() function()
if SmokeUnit:IsAlive() then if SmokeUnit:IsAlive() then
SmokeUnit:Smoke( Color, 150 ) SmokeUnit:Smoke( Color, 50 )
end end
self:Done( Index ) self:Done( Index )
end, {}, math.random( 5, 20 ) end, {}, math.random( 5, 20 )

View File

@ -692,6 +692,8 @@ do -- DETECTION_BASE
self.DetectedObjects[DetectedObjectName].Distance = Distance self.DetectedObjects[DetectedObjectName].Distance = Distance
self.DetectedObjects[DetectedObjectName].DetectionTimeStamp = DetectionTimeStamp self.DetectedObjects[DetectedObjectName].DetectionTimeStamp = DetectionTimeStamp
self:F( { DetectedObject = self.DetectedObjects[DetectedObjectName] } )
local DetectedUnit = UNIT:FindByName( DetectedObjectName ) local DetectedUnit = UNIT:FindByName( DetectedObjectName )
DetectedUnits[DetectedObjectName] = DetectedUnit DetectedUnits[DetectedObjectName] = DetectedUnit
@ -1493,6 +1495,7 @@ do -- DETECTION_BASE
for UnitName, UnitData in pairs( DetectedItem.Set:GetSet() ) do for UnitName, UnitData in pairs( DetectedItem.Set:GetSet() ) do
local DetectedObject = self.DetectedObjects[UnitName] local DetectedObject = self.DetectedObjects[UnitName]
self:F({UnitName = UnitName, IsDetected = DetectedObject.IsDetected})
if DetectedObject.IsDetected then if DetectedObject.IsDetected then
IsDetected = true IsDetected = true
break break
@ -1514,37 +1517,6 @@ do -- DETECTION_BASE
return DetectedItem.IsDetected return DetectedItem.IsDetected
end end
do -- Coordinates
--- Get the COORDINATE of a detection item using a given numeric index.
-- @param #DETECTION_BASE self
-- @param #number Index
-- @return Core.Point#COORDINATE
function DETECTION_BASE:GetDetectedItemCoordinate( Index )
-- If the Zone is set, return the coordinate of the Zone.
local DetectedItemSet = self:GetDetectedSet( Index )
local FirstUnit = DetectedItemSet:GetFirst()
local DetectedZone = self:GetDetectedItemZone( Index )
if DetectedZone then
local Coordinate = DetectedZone:GetPointVec2()
Coordinate:SetHeading(FirstUnit:GetHeading())
Coordinate:SetAlt( FirstUnit:GetAltitude() )
return Coordinate
end
-- If no Zone is set, return the coordinate of the first unit in the Set
if FirstUnit then
local Coordinate = FirstUnit:GetPointVec3()
FirstUnit:SetHeading(FirstUnit:GetHeading())
return Coordinate
end
return nil
end
end
do -- Zones do -- Zones
@ -1566,6 +1538,32 @@ do -- DETECTION_BASE
end end
--- Get the detected item coordinate.
-- @param #DETECTION_BASE self
-- @param Index
-- @return Core.Point#COORDINATE
function DETECTION_BASE:GetDetectedItemCoordinate( Index )
self:F( { Index = Index } )
return nil
end
--- Has the detected item LOS (Line Of Sight) with one of the Recce?
-- @param #DETECTION_BASE self
-- @param Index
-- @return #boolean true is LOS, false if no LOS.
function DETECTION_BASE:HasDetectedItemLOS( Index )
self:F( { Index = Index } )
local DetectedItem = self:GetDetectedItem( Index )
if DetectedItem then
return DetectedItem.LOS
end
return nil
end
--- Menu of a detected item using a given numeric index. --- Menu of a detected item using a given numeric index.
-- @param #DETECTION_BASE self -- @param #DETECTION_BASE self
-- @param Index -- @param Index
@ -1581,7 +1579,7 @@ do -- DETECTION_BASE
-- @param Index -- @param Index
-- @param Wrapper.Group#GROUP AttackGroup The group to generate the report for. -- @param Wrapper.Group#GROUP AttackGroup The group to generate the report for.
-- @param Core.Settings#SETTINGS Settings Message formatting settings to use. -- @param Core.Settings#SETTINGS Settings Message formatting settings to use.
-- @return #string -- @return Core.Report#REPORT
function DETECTION_BASE:DetectedItemReportSummary( Index, AttackGroup, Settings ) function DETECTION_BASE:DetectedItemReportSummary( Index, AttackGroup, Settings )
self:F( Index ) self:F( Index )
return nil return nil
@ -1657,6 +1655,27 @@ do -- DETECTION_UNITS
return self return self
end end
--- Get the detected item coordinate.
-- @param #DETECTION_UNITS self
-- @param Index
-- @return Core.Point#COORDINATE
function DETECTION_UNITS:GetDetectedItemCoordinate( Index )
self:F( { Index = Index } )
local DetectedItem = self:GetDetectedItem( Index )
local DetectedSet = self:GetDetectedSet( Index )
if DetectedSet then
local DetectedItemUnit = DetectedSet:GetFirst() -- Wrapper.Unit#UNIT
if DetectedItemUnit and DetectedItemUnit:IsAlive() then
local DetectedItemCoordinate = DetectedItemUnit:GetCoordinate()
DetectedItemCoordinate:SetHeading( DetectedItemUnit:GetHeading() )
return DetectedItemCoordinate
end
end
end
--- Make text documenting the changes of the detected zone. --- Make text documenting the changes of the detected zone.
-- @param #DETECTION_UNITS self -- @param #DETECTION_UNITS self
-- @param #DETECTION_UNITS.DetectedItem DetectedItem -- @param #DETECTION_UNITS.DetectedItem DetectedItem
@ -1827,7 +1846,7 @@ do -- DETECTION_UNITS
-- @param Index -- @param Index
-- @param Wrapper.Group#GROUP AttackGroup The group to generate the report for. -- @param Wrapper.Group#GROUP AttackGroup The group to generate the report for.
-- @param Core.Settings#SETTINGS Settings Message formatting settings to use. -- @param Core.Settings#SETTINGS Settings Message formatting settings to use.
-- @return #string -- @return Core.Report#REPORT The report of the detection items.
function DETECTION_UNITS:DetectedItemReportSummary( Index, AttackGroup, Settings ) function DETECTION_UNITS:DetectedItemReportSummary( Index, AttackGroup, Settings )
self:F( { Index, self.DetectedItems } ) self:F( { Index, self.DetectedItems } )
@ -1874,20 +1893,14 @@ do -- DETECTION_UNITS
local ThreatLevelA2G = DetectedItemUnit:GetThreatLevel( DetectedItem ) local ThreatLevelA2G = DetectedItemUnit:GetThreatLevel( DetectedItem )
ReportSummary = string.format( local Report = REPORT:New()
"%s - %s\n - Threat: [%s]\n - Type: %s%s", Report:Add(DetectedItemID .. ", " .. DetectedItemCoordText)
DetectedItemID, Report:Add( string.format( "Threat: [%s]", string.rep( "", ThreatLevelA2G ) ) )
DetectedItemCoordText, Report:Add( string.format("Type: %s%s", UnitCategoryText, UnitDistanceText ) )
string.rep( "", ThreatLevelA2G ), return Report
UnitCategoryText,
UnitDistanceText
)
end end
self:T( ReportSummary )
return ReportSummary
end end
return nil
end end
@ -1946,6 +1959,25 @@ do -- DETECTION_TYPES
return self return self
end end
--- Get the detected item coordinate.
-- @param #DETECTION_TYPES self
-- @param DetectedTypeName
-- @return #Core.Point#COORDINATE
function DETECTION_TYPES:GetDetectedItemCoordinate( DetectedTypeName )
self:F( { DetectedTypeName = DetectedTypeName } )
local DetectedItem = self:GetDetectedItem( DetectedTypeName )
local DetectedSet = self:GetDetectedSet( DetectedTypeName )
if DetectedItem then
local DetectedItemUnit = DetectedSet:GetFirst()
local DetectedItemCoordinate = DetectedItemUnit:GetCoordinate()
DetectedItemCoordinate:SetHeading( DetectedItemUnit:GetHeading() )
return DetectedItemCoordinate
end
end
--- Make text documenting the changes of the detected zone. --- Make text documenting the changes of the detected zone.
-- @param #DETECTION_TYPES self -- @param #DETECTION_TYPES self
@ -2055,6 +2087,7 @@ do -- DETECTION_TYPES
--self:NearestFAC( DetectedItem ) --self:NearestFAC( DetectedItem )
end end
end end
--- Menu of a DetectedItem using a given numeric index. --- Menu of a DetectedItem using a given numeric index.
@ -2095,7 +2128,7 @@ do -- DETECTION_TYPES
-- @param Index -- @param Index
-- @param Wrapper.Group#GROUP AttackGroup The group to generate the report for. -- @param Wrapper.Group#GROUP AttackGroup The group to generate the report for.
-- @param Core.Settings#SETTINGS Settings Message formatting settings to use. -- @param Core.Settings#SETTINGS Settings Message formatting settings to use.
-- @return #string -- @return Core.Report#REPORT The report of the detection items.
function DETECTION_TYPES:DetectedItemReportSummary( DetectedTypeName, AttackGroup, Settings ) function DETECTION_TYPES:DetectedItemReportSummary( DetectedTypeName, AttackGroup, Settings )
self:F( DetectedTypeName ) self:F( DetectedTypeName )
@ -2115,17 +2148,11 @@ do -- DETECTION_TYPES
local DetectedItemCoordinate = DetectedItemUnit:GetCoordinate() local DetectedItemCoordinate = DetectedItemUnit:GetCoordinate()
local DetectedItemCoordText = DetectedItemCoordinate:ToString( AttackGroup, Settings ) local DetectedItemCoordText = DetectedItemCoordinate:ToString( AttackGroup, Settings )
local ReportSummary = string.format( local Report = REPORT:New()
"%s - %s\n - Threat: [%s]\n - Type: %2d of %s", Report:Add(DetectedItemID .. ", " .. DetectedItemCoordText)
DetectedItemID, Report:Add( string.format( "Threat: [%s]", string.rep( "", ThreatLevelA2G ) ) )
DetectedItemCoordText, Report:Add( string.format("Type: %2d of %s", DetectedItemsCount, DetectedItemType ) )
string.rep( "", ThreatLevelA2G ), return Report
DetectedItemsCount,
DetectedItemType
)
self:T( ReportSummary )
return ReportSummary
end end
end end
@ -2217,6 +2244,33 @@ do -- DETECTION_AREAS
return self return self
end end
--- Get the detected item coordinate.
-- In this case, the coordinate is the center of the zone of the area, not the center unit!
-- So if units move, the retrieved coordinate can be different from the units positions.
-- @param #DETECTION_AREAS self
-- @param Index
-- @return Core.Point#COORDINATE The coordinate.
function DETECTION_AREAS:GetDetectedItemCoordinate( Index )
self:F( { Index = Index } )
local DetectedItem = self:GetDetectedItem( Index )
local DetectedItemSet = self:GetDetectedSet( Index )
local FirstUnit = DetectedItemSet:GetFirst()
if DetectedItem then
local DetectedZone = self:GetDetectedItemZone( Index )
-- TODO: Rework to COORDINATE. Problem with SetAlt.
local DetectedItemCoordinate = DetectedZone:GetPointVec2()
-- These need to be done to understand the heading and altitude of the first unit in the zone.
DetectedItemCoordinate:SetHeading( FirstUnit:GetHeading() )
DetectedItemCoordinate:SetAlt( FirstUnit:GetAltitude() )
return DetectedItemCoordinate
end
return nil
end
--- Menu of a detected item using a given numeric index. --- Menu of a detected item using a given numeric index.
-- @param #DETECTION_AREAS self -- @param #DETECTION_AREAS self
-- @param Index -- @param Index
@ -2252,7 +2306,7 @@ do -- DETECTION_AREAS
-- @param Index -- @param Index
-- @param Wrapper.Group#GROUP AttackGroup The group to get the settings for. -- @param Wrapper.Group#GROUP AttackGroup The group to get the settings for.
-- @param Core.Settings#SETTINGS Settings (Optional) Message formatting settings to use. -- @param Core.Settings#SETTINGS Settings (Optional) Message formatting settings to use.
-- @return #string -- @return Core.Report#REPORT The report of the detection items.
function DETECTION_AREAS:DetectedItemReportSummary( Index, AttackGroup, Settings ) function DETECTION_AREAS:DetectedItemReportSummary( Index, AttackGroup, Settings )
self:F( Index ) self:F( Index )
@ -2271,16 +2325,12 @@ do -- DETECTION_AREAS
local DetectedItemsCount = DetectedSet:Count() local DetectedItemsCount = DetectedSet:Count()
local DetectedItemsTypes = DetectedSet:GetTypeNames() local DetectedItemsTypes = DetectedSet:GetTypeNames()
local ReportSummary = string.format( local Report = REPORT:New()
"%s - %s\n - Threat: [%s]\n - Type: %2d of %s", Report:Add(DetectedItemID .. ", " .. DetectedItemCoordText)
DetectedItemID, Report:Add( string.format( "Threat: [%s]", string.rep( "", ThreatLevelA2G ) ) )
DetectedItemCoordText, Report:Add( string.format("Type: %2d of %s", DetectedItemsCount, DetectedItemsTypes ) )
string.rep( "", ThreatLevelA2G ),
DetectedItemsCount,
DetectedItemsTypes
)
return ReportSummary return Report
end end
return nil return nil

View File

@ -1171,7 +1171,7 @@ function ESCORT:_ReportTargetsScheduler()
if ClientEscortGroupName == EscortGroupName then if ClientEscortGroupName == EscortGroupName then
DetectedMsgs[#DetectedMsgs+1] = DetectedItemReportSummary DetectedMsgs[#DetectedMsgs+1] = DetectedItemReportSummary:Text("\n")
MENU_CLIENT_COMMAND:New( self.EscortClient, MENU_CLIENT_COMMAND:New( self.EscortClient,
DetectedItemReportSummary, DetectedItemReportSummary,

View File

@ -13,92 +13,6 @@
--- The REPORT class
-- @type REPORT
-- @extends Core.Base#BASE
REPORT = {
ClassName = "REPORT",
Title = "",
}
--- Create a new REPORT.
-- @param #REPORT self
-- @param #string Title
-- @return #REPORT
function REPORT:New( Title )
local self = BASE:Inherit( self, BASE:New() ) -- #REPORT
self.Report = {}
self:SetTitle( Title or "" )
self:SetIndent( 3 )
return self
end
--- Has the REPORT Text?
-- @param #REPORT self
-- @return #boolean
function REPORT:HasText() --R2.1
return #self.Report > 0
end
--- Set indent of a REPORT.
-- @param #REPORT self
-- @param #number Indent
-- @return #REPORT
function REPORT:SetIndent( Indent ) --R2.1
self.Indent = Indent
return self
end
--- Add a new line to a REPORT.
-- @param #REPORT self
-- @param #string Text
-- @return #REPORT
function REPORT:Add( Text )
self.Report[#self.Report+1] = Text
return self
end
--- Add a new line to a REPORT.
-- @param #REPORT self
-- @param #string Text
-- @return #REPORT
function REPORT:AddIndent( Text ) --R2.1
self.Report[#self.Report+1] = string.rep(" ", self.Indent ) .. Text:gsub("\n","\n"..string.rep( " ", self.Indent ) )
return self
end
--- Produces the text of the report, taking into account an optional delimeter, which is \n by default.
-- @param #REPORT self
-- @param #string Delimiter (optional) A delimiter text.
-- @return #string The report text.
function REPORT:Text( Delimiter )
Delimiter = Delimiter or "\n"
local ReportText = ( self.Title ~= "" and self.Title .. Delimiter or self.Title ) .. table.concat( self.Report, Delimiter ) or ""
return ReportText
end
--- Sets the title of the report.
-- @param #REPORT self
-- @param #string Title The title of the report.
-- @return #REPORT
function REPORT:SetTitle( Title )
self.Title = Title
return self
end
--- Gets the amount of report items contained in the report.
-- @param #REPORT self
-- @return #number Returns the number of report items contained in the report. 0 is returned if no report items are contained in the report. The title is not counted for.
function REPORT:GetCount()
return #self.Report
end
--- The COMMANDCENTER class --- The COMMANDCENTER class

View File

@ -226,7 +226,7 @@ do -- TASK_A2G_DISPATCHER
local DetectedSet = DetectedItem.Set -- Core.Set#SET_UNIT local DetectedSet = DetectedItem.Set -- Core.Set#SET_UNIT
local DetectedZone = DetectedItem.Zone local DetectedZone = DetectedItem.Zone
--self:E( { "Targets in DetectedItem", DetectedItem.ItemID, DetectedSet:Count(), tostring( DetectedItem ) } ) --self:E( { "Targets in DetectedItem", DetectedItem.ItemID, DetectedSet:Count(), tostring( DetectedItem ) } )
DetectedSet:Flush() --DetectedSet:Flush()
local DetectedItemID = DetectedItem.ID local DetectedItemID = DetectedItem.ID
local TaskIndex = DetectedItem.Index local TaskIndex = DetectedItem.Index

View File

@ -2,6 +2,7 @@ Utilities/Routines.lua
Utilities/Utils.lua Utilities/Utils.lua
Core/Base.lua Core/Base.lua
Core/Report.lua
Core/Scheduler.lua Core/Scheduler.lua
Core/ScheduleDispatcher.lua Core/ScheduleDispatcher.lua
Core/Event.lua Core/Event.lua

View File

@ -1,5 +1,5 @@
env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' ) env.info( '*** MOOSE DYNAMIC INCLUDE START *** ' )
env.info( 'Moose Generation Timestamp: 20170725_0806' ) env.info( 'Moose Generation Timestamp: 20170811_0800' )
local base = _G local base = _G
@ -24,6 +24,7 @@ __Moose.Includes = {}
__Moose.Include( 'Utilities/Routines.lua' ) __Moose.Include( 'Utilities/Routines.lua' )
__Moose.Include( 'Utilities/Utils.lua' ) __Moose.Include( 'Utilities/Utils.lua' )
__Moose.Include( 'Core/Base.lua' ) __Moose.Include( 'Core/Base.lua' )
__Moose.Include( 'Core/Report.lua' )
__Moose.Include( 'Core/Scheduler.lua' ) __Moose.Include( 'Core/Scheduler.lua' )
__Moose.Include( 'Core/ScheduleDispatcher.lua' ) __Moose.Include( 'Core/ScheduleDispatcher.lua' )
__Moose.Include( 'Core/Event.lua' ) __Moose.Include( 'Core/Event.lua' )

View File

@ -661,7 +661,6 @@
<dl class="function"> <dl class="function">
<dt> <dt>
<em>#number</em>
<a id="#(AI_A2A).IdleCount" > <a id="#(AI_A2A).IdleCount" >
<strong>AI_A2A.IdleCount</strong> <strong>AI_A2A.IdleCount</strong>
</a> </a>

View File

@ -3542,6 +3542,7 @@ The range till cargo will board.</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em>#number</em>
<a id="#(CARGO_UNIT).RunCount" > <a id="#(CARGO_UNIT).RunCount" >
<strong>CARGO_UNIT.RunCount</strong> <strong>CARGO_UNIT.RunCount</strong>
</a> </a>

View File

@ -127,12 +127,6 @@
<h1>COMMANDCENTER class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1> <h1>COMMANDCENTER class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p> The COMMANDCENTER class governs multiple missions, the tasking and the reporting.</p> <p> The COMMANDCENTER class governs multiple missions, the tasking and the reporting.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#REPORT">REPORT</a></td>
<td class="summary">
</td> </td>
</tr> </tr>
</table> </table>
@ -270,82 +264,6 @@ and will be replaced by a navigation using Reference Zones.</p>
<td class="name" nowrap="nowrap"><a href="##(COMMANDCENTER).SetReferenceZones">COMMANDCENTER:SetReferenceZones(ReferenceZonePrefix)</a></td> <td class="name" nowrap="nowrap"><a href="##(COMMANDCENTER).SetReferenceZones">COMMANDCENTER:SetReferenceZones(ReferenceZonePrefix)</a></td>
<td class="summary"> <td class="summary">
<p>Set special Reference Zones known by the Command Center to guide airborne pilots during WWII.</p> <p>Set special Reference Zones known by the Command Center to guide airborne pilots during WWII.</p>
</td>
</tr>
</table>
<h2><a id="#(REPORT)">Type <code>REPORT</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(REPORT).Add">REPORT:Add(Text)</a></td>
<td class="summary">
<p>Add a new line to a REPORT.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(REPORT).AddIndent">REPORT:AddIndent(Text)</a></td>
<td class="summary">
<p>Add a new line to a REPORT.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(REPORT).ClassName">REPORT.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(REPORT).GetCount">REPORT:GetCount()</a></td>
<td class="summary">
<p>Gets the amount of report items contained in the report.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(REPORT).HasText">REPORT:HasText()</a></td>
<td class="summary">
<p>Has the REPORT Text?</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(REPORT).Indent">REPORT.Indent</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(REPORT).New">REPORT:New(Title)</a></td>
<td class="summary">
<p>Create a new REPORT.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(REPORT).Report">REPORT.Report</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(REPORT).SetIndent">REPORT:SetIndent(Indent)</a></td>
<td class="summary">
<p>Set indent of a REPORT.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(REPORT).SetTitle">REPORT:SetTitle(Title)</a></td>
<td class="summary">
<p>Sets the title of the report.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(REPORT).Text">REPORT:Text(Delimiter)</a></td>
<td class="summary">
<p>Produces the text of the report, taking into account an optional delimeter, which is \n by default.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(REPORT).Title">REPORT.Title</a></td>
<td class="summary">
</td> </td>
</tr> </tr>
</table> </table>
@ -414,20 +332,6 @@ This is done by using the method <a href="##(COMMANDCENTER).SetReferenceZones">C
For the moment, only one Reference Zone class can be specified, but in the future, more classes will become possible.</p> For the moment, only one Reference Zone class can be specified, but in the future, more classes will become possible.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(REPORT)">#REPORT</a></em>
<a id="REPORT" >
<strong>REPORT</strong>
</a>
</dt>
<dd>
</dd> </dd>
</dl> </dl>
<h2><a id="#(CommandCenter)" >Type <code>CommandCenter</code></a></h2> <h2><a id="#(CommandCenter)" >Type <code>CommandCenter</code></a></h2>
@ -937,262 +841,6 @@ The name before the #-mark indicating the class of the Reference Zones.</p>
<p><em><a href="##(COMMANDCENTER)">#COMMANDCENTER</a>:</em></p> <p><em><a href="##(COMMANDCENTER)">#COMMANDCENTER</a>:</em></p>
</dd>
</dl>
<h2><a id="#(REPORT)" >Type <code>REPORT</code></a></h2>
<p>The REPORT class</p>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(REPORT).Add" >
<strong>REPORT:Add(Text)</strong>
</a>
</dt>
<dd>
<p>Add a new line to a REPORT.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string Text </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(REPORT)">#REPORT</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(REPORT).AddIndent" >
<strong>REPORT:AddIndent(Text)</strong>
</a>
</dt>
<dd>
<p>Add a new line to a REPORT.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string Text </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(REPORT)">#REPORT</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(REPORT).ClassName" >
<strong>REPORT.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(REPORT).GetCount" >
<strong>REPORT:GetCount()</strong>
</a>
</dt>
<dd>
<p>Gets the amount of report items contained in the report.</p>
<h3>Return value</h3>
<p><em>#number:</em>
Returns the number of report items contained in the report. 0 is returned if no report items are contained in the report. The title is not counted for.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(REPORT).HasText" >
<strong>REPORT:HasText()</strong>
</a>
</dt>
<dd>
<p>Has the REPORT Text?</p>
<h3>Return value</h3>
<p><em>#boolean:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(REPORT).Indent" >
<strong>REPORT.Indent</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(REPORT).New" >
<strong>REPORT:New(Title)</strong>
</a>
</dt>
<dd>
<p>Create a new REPORT.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string Title </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(REPORT)">#REPORT</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(REPORT).Report" >
<strong>REPORT.Report</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(REPORT).SetIndent" >
<strong>REPORT:SetIndent(Indent)</strong>
</a>
</dt>
<dd>
<p>Set indent of a REPORT.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number Indent </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(REPORT)">#REPORT</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(REPORT).SetTitle" >
<strong>REPORT:SetTitle(Title)</strong>
</a>
</dt>
<dd>
<p>Sets the title of the report.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string Title </em></code>:
The title of the report.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(REPORT)">#REPORT</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(REPORT).Text" >
<strong>REPORT:Text(Delimiter)</strong>
</a>
</dt>
<dd>
<p>Produces the text of the report, taking into account an optional delimeter, which is \n by default.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string Delimiter </em></code>:
(optional) A delimiter text.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#string:</em>
The report text.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(REPORT).Title" >
<strong>REPORT.Title</strong>
</a>
</dt>
<dd>
</dd> </dd>
</dl> </dl>

View File

@ -836,7 +836,7 @@ The method <a href="##(CONTROLLABLE).SetTaskAtWaypoint">CONTROLLABLE.SetTaskAtWa
<li><a href="##(CONTROLLABLE).RouteAirTo">CONTROLLABLE.RouteAirTo</a>(): Make the AIR Controllable to fly towards a specific coordinate. </li> <li><a href="##(CONTROLLABLE).RouteAirTo">CONTROLLABLE.RouteAirTo</a>(): Make the AIR Controllable to fly towards a specific coordinate. </li>
</ul> </ul>
<h2>CONTROLLABLE Option methods</h2> <h2>Option methods</h2>
<p>Controllable <strong>Option methods</strong> change the behaviour of the Controllable while being alive.</p> <p>Controllable <strong>Option methods</strong> change the behaviour of the Controllable while being alive.</p>

View File

@ -108,6 +108,7 @@
<p><strong>Functional</strong> -- Management of target <strong>Designation</strong>.</p> <p><strong>Functional</strong> -- Management of target <strong>Designation</strong>.</p>
<p>Lase, smoke and illuminate targets.</p>
<p>--<img src="..\Presentations\DESIGNATE\Dia1.JPG" alt="Banner Image"/></p> <p>--<img src="..\Presentations\DESIGNATE\Dia1.JPG" alt="Banner Image"/></p>
@ -163,12 +164,6 @@ each detected set of potential targets can be lased or smoked...</p>
<h2><a id="#(DESIGNATE)">Type <code>DESIGNATE</code></a></h2> <h2><a id="#(DESIGNATE)">Type <code>DESIGNATE</code></a></h2>
<table class="function_list"> <table class="function_list">
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).ActivateAutoLase">DESIGNATE:ActivateAutoLase()</a></td>
<td class="summary">
<p>Coordinates the Auto Lase.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).AttackSet">DESIGNATE.AttackSet</a></td> <td class="name" nowrap="nowrap"><a href="##(DESIGNATE).AttackSet">DESIGNATE.AttackSet</a></td>
<td class="summary"> <td class="summary">
@ -184,12 +179,24 @@ each detected set of potential targets can be lased or smoked...</p>
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).CC">DESIGNATE.CC</a></td> <td class="name" nowrap="nowrap"><a href="##(DESIGNATE).CC">DESIGNATE.CC</a></td>
<td class="summary"> <td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).CoordinateLase">DESIGNATE:CoordinateLase()</a></td>
<td class="summary">
<p>Coordinates the Auto Lase.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).Designating">DESIGNATE.Designating</a></td> <td class="name" nowrap="nowrap"><a href="##(DESIGNATE).Designating">DESIGNATE.Designating</a></td>
<td class="summary"> <td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).DesignationScope">DESIGNATE:DesignationScope()</a></td>
<td class="summary">
<p>Adapt the designation scope according the detected items.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -250,6 +257,12 @@ each detected set of potential targets can be lased or smoked...</p>
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).LaserCodesUsed">DESIGNATE.LaserCodesUsed</a></td> <td class="name" nowrap="nowrap"><a href="##(DESIGNATE).LaserCodesUsed">DESIGNATE.LaserCodesUsed</a></td>
<td class="summary"> <td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).MaximumDesignations">DESIGNATE.MaximumDesignations</a></td>
<td class="summary">
</td> </td>
</tr> </tr>
<tr> <tr>
@ -268,6 +281,12 @@ each detected set of potential targets can be lased or smoked...</p>
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).MenuFlashStatus">DESIGNATE:MenuFlashStatus(AttackGroup, Flash)</a></td> <td class="name" nowrap="nowrap"><a href="##(DESIGNATE).MenuFlashStatus">DESIGNATE:MenuFlashStatus(AttackGroup, Flash)</a></td>
<td class="summary"> <td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).MenuForget">DESIGNATE:MenuForget(Index)</a></td>
<td class="summary">
</td> </td>
</tr> </tr>
<tr> <tr>
@ -424,6 +443,12 @@ each detected set of potential targets can be lased or smoked...</p>
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).SetLaserCodes">DESIGNATE:SetLaserCodes(<, LaserCodes)</a></td> <td class="name" nowrap="nowrap"><a href="##(DESIGNATE).SetLaserCodes">DESIGNATE:SetLaserCodes(<, LaserCodes)</a></td>
<td class="summary"> <td class="summary">
<p>Set an array of possible laser codes.</p> <p>Set an array of possible laser codes.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DESIGNATE).SetMaximumDesignations">DESIGNATE:SetMaximumDesignations(MaximumDesignations)</a></td>
<td class="summary">
<p>Set the maximum amount of designations.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -585,11 +610,15 @@ each detected set of potential targets can be lased or smoked...</p>
<p>The RecceSet is continuously detecting for potential Targets, executing its task as part of the DetectionObject. <p>The RecceSet is continuously detecting for potential Targets, executing its task as part of the DetectionObject.
Once Targets have been detected, the DesignateObject will trigger the <strong>Detect Event</strong>.</p> Once Targets have been detected, the DesignateObject will trigger the <strong>Detect Event</strong>.</p>
<p>In order to prevent an overflow in the DesignateObject of detected targets, there is a maximum
amount of DetectionItems that can be put in <strong>scope</strong> of the DesignateObject.
We call this the <strong>MaximumDesignations</strong> term.</p>
<p>As part of the Detect Event, the DetectionItems list is used by the DesignateObject to provide the Players with:</p> <p>As part of the Detect Event, the DetectionItems list is used by the DesignateObject to provide the Players with:</p>
<ul> <ul>
<li>The RecceGroups are reporting to each AttackGroup, sending <strong>Messages</strong> containing the Threat Level and the TargetSet composition.</li> <li>The RecceGroups are reporting to each AttackGroup, sending <strong>Messages</strong> containing the Threat Level and the TargetSet composition.</li>
<li><strong>Menu options</strong> are created and updated for each AttackGroup, containing the Threat Level and the TargetSet composition.</li> <li><strong>Menu options</strong> are created and updated for each AttackGroup, containing the Detection ID and the Coordinates.</li>
</ul> </ul>
<p>A Player can then select an action from the Designate Menu. </p> <p>A Player can then select an action from the Designate Menu. </p>
@ -633,7 +662,7 @@ Once Targets have been detected, the DesignateObject will trigger the <strong>De
<h3>2.1 DESIGNATE States</h3> <h3>2.1 DESIGNATE States</h3>
<ul> <ul>
<li><strong>Designating</strong> ( Group ): The process is not started yet.</li> <li><strong>Designating</strong> ( Group ): The designation process.</li>
</ul> </ul>
<h3>2.2 DESIGNATE Events</h3> <h3>2.2 DESIGNATE Events</h3>
@ -646,9 +675,17 @@ Once Targets have been detected, the DesignateObject will trigger the <strong>De
<li>**<a href="##(DESIGNATE).Status">DESIGNATE.Status</a>**: Report designation status.</li> <li>**<a href="##(DESIGNATE).Status">DESIGNATE.Status</a>**: Report designation status.</li>
</ul> </ul>
<h2>3. Laser codes</h2> <h2>3. Maximum Designations</h2>
<h3>3.1 Set possible laser codes</h3> <p>In order to prevent an overflow of designations due to many Detected Targets, there is a
Maximum Designations scope that is set in the DesignationObject.</p>
<p>The method <a href="##(DESIGNATE).SetMaximumDesignations">DESIGNATE.SetMaximumDesignations</a>() will put a limit on the amount of designations put in scope of the DesignationObject.
Using the menu system, the player can "forget" a designation, so that gradually a new designation can be put in scope when detected.</p>
<h2>4. Laser codes</h2>
<h3>4.1 Set possible laser codes</h3>
<p>An array of laser codes can be provided, that will be used by the DESIGNATE when lasing. <p>An array of laser codes can be provided, that will be used by the DESIGNATE when lasing.
The laser code is communicated by the Recce when it is lasing a larget. The laser code is communicated by the Recce when it is lasing a larget.
@ -668,11 +705,11 @@ One laser code can be given or an sequence of laser codes through an table...</p
<p>The above sets a collection of possible laser codes that can be assigned. <strong>Note the { } notation!</strong></p> <p>The above sets a collection of possible laser codes that can be assigned. <strong>Note the { } notation!</strong></p>
<h3>3.2 Auto generate laser codes</h3> <h3>4.2 Auto generate laser codes</h3>
<p>Use the method <a href="##(DESIGNATE).GenerateLaserCodes">DESIGNATE.GenerateLaserCodes</a>() to generate all possible laser codes. Logic implemented and advised by Ciribob!</p> <p>Use the method <a href="##(DESIGNATE).GenerateLaserCodes">DESIGNATE.GenerateLaserCodes</a>() to generate all possible laser codes. Logic implemented and advised by Ciribob!</p>
<h2>4. Autolase to automatically lase detected targets.</h2> <h2>5. Autolase to automatically lase detected targets.</h2>
<p>DetectionItems can be auto lased once detected by Recces. As such, there is almost no action required from the Players using the Designate Menu. <p>DetectionItems can be auto lased once detected by Recces. As such, there is almost no action required from the Players using the Designate Menu.
The <strong>auto lase</strong> function can be activated through the Designation Menu. The <strong>auto lase</strong> function can be activated through the Designation Menu.
@ -684,7 +721,7 @@ Note that autolase will automatically activate lasing for ALL DetectedItems. Ind
<p>Activate the auto lasing.</p> <p>Activate the auto lasing.</p>
<h2>5. Target prioritization on threat level</h2> <h2>6. Target prioritization on threat level</h2>
<p>Targets can be detected of different types in one DetectionItem. Depending on the type of the Target, a different threat level applies in an Air to Ground combat context. <p>Targets can be detected of different types in one DetectionItem. Depending on the type of the Target, a different threat level applies in an Air to Ground combat context.
SAMs are of a higher threat than normal tanks. So, if the Target type was recognized, the Recces will select those targets that form the biggest threat first, SAMs are of a higher threat than normal tanks. So, if the Target type was recognized, the Recces will select those targets that form the biggest threat first,
@ -729,24 +766,6 @@ Use the method <a href="##(DESIGNATE).SetMission">DESIGNATE.SetMission</a>() to
<dl class="function"> <dl class="function">
<dt> <dt>
<a id="#(DESIGNATE).ActivateAutoLase" >
<strong>DESIGNATE:ActivateAutoLase()</strong>
</a>
</dt>
<dd>
<p>Coordinates the Auto Lase.</p>
<h3>Return value</h3>
<p><em><a href="##(DESIGNATE)">#DESIGNATE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em> <em></em>
<a id="#(DESIGNATE).AttackSet" > <a id="#(DESIGNATE).AttackSet" >
<strong>DESIGNATE.AttackSet</strong> <strong>DESIGNATE.AttackSet</strong>
@ -784,6 +803,24 @@ Use the method <a href="##(DESIGNATE).SetMission">DESIGNATE.SetMission</a>() to
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESIGNATE).CoordinateLase" >
<strong>DESIGNATE:CoordinateLase()</strong>
</a>
</dt>
<dd>
<p>Coordinates the Auto Lase.</p>
<h3>Return value</h3>
<p><em><a href="##(DESIGNATE)">#DESIGNATE</a>:</em></p>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">
@ -798,6 +835,24 @@ Use the method <a href="##(DESIGNATE).SetMission">DESIGNATE.SetMission</a>() to
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESIGNATE).DesignationScope" >
<strong>DESIGNATE:DesignationScope()</strong>
</a>
</dt>
<dd>
<p>Adapt the designation scope according the detected items.</p>
<h3>Return value</h3>
<p><em><a href="##(DESIGNATE)">#DESIGNATE</a>:</em></p>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">
@ -923,7 +978,6 @@ function below will use the range 1-7 just in case</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em></em>
<a id="#(DESIGNATE).LaserCodes" > <a id="#(DESIGNATE).LaserCodes" >
<strong>DESIGNATE.LaserCodes</strong> <strong>DESIGNATE.LaserCodes</strong>
</a> </a>
@ -946,6 +1000,20 @@ function below will use the range 1-7 just in case</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(DESIGNATE).MaximumDesignations" >
<strong>DESIGNATE.MaximumDesignations</strong>
</a>
</dt>
<dd>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">
@ -1011,6 +1079,27 @@ function below will use the range 1-7 just in case</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<a id="#(DESIGNATE).MenuForget" >
<strong>DESIGNATE:MenuForget(Index)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Index </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESIGNATE).MenuIlluminate" > <a id="#(DESIGNATE).MenuIlluminate" >
<strong>DESIGNATE:MenuIlluminate(Index)</strong> <strong>DESIGNATE:MenuIlluminate(Index)</strong>
</a> </a>
@ -1767,6 +1856,32 @@ number> LaserCodes</p>
<p><em><a href="##(DESIGNATE)">#DESIGNATE</a>:</em></p> <p><em><a href="##(DESIGNATE)">#DESIGNATE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DESIGNATE).SetMaximumDesignations" >
<strong>DESIGNATE:SetMaximumDesignations(MaximumDesignations)</strong>
</a>
</dt>
<dd>
<p>Set the maximum amount of designations.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number MaximumDesignations </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(DESIGNATE)">#DESIGNATE</a>:</em></p>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">

View File

@ -262,6 +262,12 @@ DETECTION uses the in-built detection capabilities of DCS World, but adds new fu
<td class="name" nowrap="nowrap"><a href="##(DETECTION_AREAS).GetChangeText">DETECTION_AREAS:GetChangeText(DetectedItem)</a></td> <td class="name" nowrap="nowrap"><a href="##(DETECTION_AREAS).GetChangeText">DETECTION_AREAS:GetChangeText(DetectedItem)</a></td>
<td class="summary"> <td class="summary">
<p>Make text documenting the changes of the detected zone.</p> <p>Make text documenting the changes of the detected zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_AREAS).GetDetectedItemCoordinate">DETECTION_AREAS:GetDetectedItemCoordinate(Index)</a></td>
<td class="summary">
<p>Get the detected item coordinate.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -570,7 +576,7 @@ The different values of Unit.Category can be:</p>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).GetDetectedItemCoordinate">DETECTION_BASE:GetDetectedItemCoordinate(Index)</a></td> <td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).GetDetectedItemCoordinate">DETECTION_BASE:GetDetectedItemCoordinate(Index)</a></td>
<td class="summary"> <td class="summary">
<p>Get the COORDINATE of a detection item using a given numeric index.</p> <p>Get the detected item coordinate.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -637,6 +643,12 @@ The different values of Unit.Category can be:</p>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).GetPlayersNearBy">DETECTION_BASE:GetPlayersNearBy(DetectedItem)</a></td> <td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).GetPlayersNearBy">DETECTION_BASE:GetPlayersNearBy(DetectedItem)</a></td>
<td class="summary"> <td class="summary">
<p>Returns friendly units nearby the FAC units ...</p> <p>Returns friendly units nearby the FAC units ...</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_BASE).HasDetectedItemLOS">DETECTION_BASE:HasDetectedItemLOS(Index)</a></td>
<td class="summary">
<p>Has the detected item LOS (Line Of Sight) with one of the Recce?</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -1135,6 +1147,12 @@ The different values of Unit.Category can be:</p>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_TYPES).GetChangeText">DETECTION_TYPES:GetChangeText(DetectedItem)</a></td> <td class="name" nowrap="nowrap"><a href="##(DETECTION_TYPES).GetChangeText">DETECTION_TYPES:GetChangeText(DetectedItem)</a></td>
<td class="summary"> <td class="summary">
<p>Make text documenting the changes of the detected zone.</p> <p>Make text documenting the changes of the detected zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_TYPES).GetDetectedItemCoordinate">DETECTION_TYPES:GetDetectedItemCoordinate(DetectedTypeName)</a></td>
<td class="summary">
<p>Get the detected item coordinate.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -1217,6 +1235,12 @@ The different values of Unit.Category can be:</p>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_UNITS).GetChangeText">DETECTION_UNITS:GetChangeText(DetectedItem)</a></td> <td class="name" nowrap="nowrap"><a href="##(DETECTION_UNITS).GetChangeText">DETECTION_UNITS:GetChangeText(DetectedItem)</a></td>
<td class="summary"> <td class="summary">
<p>Make text documenting the changes of the detected zone.</p> <p>Make text documenting the changes of the detected zone.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(DETECTION_UNITS).GetDetectedItemCoordinate">DETECTION_UNITS:GetDetectedItemCoordinate(Index)</a></td>
<td class="summary">
<p>Get the detected item coordinate.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -1547,6 +1571,8 @@ a DetectedItem. The default range is 6000 meters. For air detections, it is advi
</dl> </dl>
<h2><a id="#(Detection)" >Type <code>Detection</code></a></h2> <h2><a id="#(Detection)" >Type <code>Detection</code></a></h2>
<h2><a id="#(Core.Point)" >Type <code>Core.Point</code></a></h2>
<h2><a id="#(DETECTION_AREAS)" >Type <code>DETECTION_AREAS</code></a></h2> <h2><a id="#(DETECTION_AREAS)" >Type <code>DETECTION_AREAS</code></a></h2>
<p> # 4) DETECTION_AREAS class, extends <a href="Detection.html##(DETECTION_BASE)">Detection#DETECTION_BASE</a></p> <p> # 4) DETECTION_AREAS class, extends <a href="Detection.html##(DETECTION_BASE)">Detection#DETECTION_BASE</a></p>
@ -1760,8 +1786,8 @@ The group to get the settings for.</p>
</ul> </ul>
<h3>Return value</h3> <h3>Return value</h3>
<p><em>#string:</em></p> <p><em><a href="Core.Report.html##(REPORT)">Core.Report#REPORT</a>:</em>
The report of the detection items.</p>
</dd> </dd>
</dl> </dl>
@ -1885,6 +1911,36 @@ The Changes text</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<a id="#(DETECTION_AREAS).GetDetectedItemCoordinate" >
<strong>DETECTION_AREAS:GetDetectedItemCoordinate(Index)</strong>
</a>
</dt>
<dd>
<p>Get the detected item coordinate.</p>
<p>In this case, the coordinate is the center of the zone of the area, not the center unit!
So if units move, the retrieved coordinate can be different from the units positions.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Index </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Core.Point.html##(COORDINATE)">Core.Point#COORDINATE</a>:</em>
The coordinate.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_AREAS).GetTreatLevelA2G" > <a id="#(DETECTION_AREAS).GetTreatLevelA2G" >
<strong>DETECTION_AREAS:GetTreatLevelA2G(DetectedItem)</strong> <strong>DETECTION_AREAS:GetTreatLevelA2G(DetectedItem)</strong>
</a> </a>
@ -2551,7 +2607,7 @@ Message formatting settings to use.</p>
</ul> </ul>
<h3>Return value</h3> <h3>Return value</h3>
<p><em>#string:</em></p> <p><em><a href="Core.Report.html##(REPORT)">Core.Report#REPORT</a>:</em></p>
</dd> </dd>
@ -2881,13 +2937,13 @@ DetectedItemID</p>
</dt> </dt>
<dd> <dd>
<p>Get the COORDINATE of a detection item using a given numeric index.</p> <p>Get the detected item coordinate.</p>
<h3>Parameter</h3> <h3>Parameter</h3>
<ul> <ul>
<li> <li>
<p><code><em>#number Index </em></code>: </p> <p><code><em> Index </em></code>: </p>
</li> </li>
</ul> </ul>
@ -3163,6 +3219,32 @@ The distance. </p>
<dl class="function"> <dl class="function">
<dt> <dt>
<a id="#(DETECTION_BASE).HasDetectedItemLOS" >
<strong>DETECTION_BASE:HasDetectedItemLOS(Index)</strong>
</a>
</dt>
<dd>
<p>Has the detected item LOS (Line Of Sight) with one of the Recce?</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Index </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#boolean:</em>
true is LOS, false if no LOS.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_BASE).IdentifyDetectedObject" > <a id="#(DETECTION_BASE).IdentifyDetectedObject" >
<strong>DETECTION_BASE:IdentifyDetectedObject(DetectedObject)</strong> <strong>DETECTION_BASE:IdentifyDetectedObject(DetectedObject)</strong>
</a> </a>
@ -5063,8 +5145,8 @@ Message formatting settings to use.</p>
</ul> </ul>
<h3>Return value</h3> <h3>Return value</h3>
<p><em>#string:</em></p> <p><em><a href="Core.Report.html##(REPORT)">Core.Report#REPORT</a>:</em>
The report of the detection items.</p>
</dd> </dd>
</dl> </dl>
@ -5137,6 +5219,32 @@ The Changes text</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<a id="#(DETECTION_TYPES).GetDetectedItemCoordinate" >
<strong>DETECTION_TYPES:GetDetectedItemCoordinate(DetectedTypeName)</strong>
</a>
</dt>
<dd>
<p>Get the detected item coordinate.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> DetectedTypeName </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(Core.Point)">#Core.Point</a>:</em>
COORDINATE</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_TYPES).New" > <a id="#(DETECTION_TYPES).New" >
<strong>DETECTION_TYPES:New(DetectionSetGroup)</strong> <strong>DETECTION_TYPES:New(DetectionSetGroup)</strong>
</a> </a>
@ -5345,8 +5453,8 @@ Message formatting settings to use.</p>
</ul> </ul>
<h3>Return value</h3> <h3>Return value</h3>
<p><em>#string:</em></p> <p><em><a href="Core.Report.html##(REPORT)">Core.Report#REPORT</a>:</em>
The report of the detection items.</p>
</dd> </dd>
</dl> </dl>
@ -5415,6 +5523,32 @@ The group to generate the report for.</p>
<p><em>#string:</em> <p><em>#string:</em>
The Changes text</p> The Changes text</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(DETECTION_UNITS).GetDetectedItemCoordinate" >
<strong>DETECTION_UNITS:GetDetectedItemCoordinate(Index)</strong>
</a>
</dt>
<dd>
<p>Get the detected item coordinate.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Index </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="Core.Point.html##(COORDINATE)">Core.Point#COORDINATE</a>:</em></p>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">

View File

@ -1598,7 +1598,7 @@ A string defining the start state.</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em>#string</em> <em></em>
<a id="#(FSM)._StartState" > <a id="#(FSM)._StartState" >
<strong>FSM._StartState</strong> <strong>FSM._StartState</strong>
</a> </a>
@ -1897,6 +1897,7 @@ A string defining the start state.</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em></em>
<a id="#(FSM).current" > <a id="#(FSM).current" >
<strong>FSM.current</strong> <strong>FSM.current</strong>
</a> </a>

View File

@ -424,7 +424,7 @@ classes are derived from, in order to set commands.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).RemoveSubMenus">MENU_GROUP:RemoveSubMenus(MenuTime, MenuTag, Menutag)</a></td> <td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).RemoveSubMenus">MENU_GROUP:RemoveSubMenus(MenuTime, MenuTag)</a></td>
<td class="summary"> <td class="summary">
<p>Removes the sub menus recursively of this MENU_GROUP.</p> <p>Removes the sub menus recursively of this MENU_GROUP.</p>
</td> </td>
@ -1619,7 +1619,7 @@ A Tag or Key to filter the menus to be refreshed with the Tag set.</p>
<dt> <dt>
<a id="#(MENU_GROUP).RemoveSubMenus" > <a id="#(MENU_GROUP).RemoveSubMenus" >
<strong>MENU_GROUP:RemoveSubMenus(MenuTime, MenuTag, Menutag)</strong> <strong>MENU_GROUP:RemoveSubMenus(MenuTime, MenuTag)</strong>
</a> </a>
</dt> </dt>
<dd> <dd>
@ -1638,11 +1638,6 @@ A Tag or Key to filter the menus to be refreshed with the Tag set.</p>
<p><code><em> MenuTag </em></code>: <p><code><em> MenuTag </em></code>:
A Tag or Key to filter the menus to be refreshed with the Tag set.</p> A Tag or Key to filter the menus to be refreshed with the Tag set.</p>
</li>
<li>
<p><code><em> Menutag </em></code>: </p>
</li> </li>
</ul> </ul>
<h3>Return value</h3> <h3>Return value</h3>
@ -1793,6 +1788,9 @@ An argument for the function.</p>
<p>self:E({Path=Path}) </p>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">

View File

@ -1828,7 +1828,6 @@ self</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em><a href="Core.Spot.html##(SPOT)">Core.Spot#SPOT</a></em>
<a id="#(POSITIONABLE).Spot" > <a id="#(POSITIONABLE).Spot" >
<strong>POSITIONABLE.Spot</strong> <strong>POSITIONABLE.Spot</strong>
</a> </a>

View File

@ -1142,7 +1142,7 @@ true if metric.</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em></em> <em>#boolean</em>
<a id="#(SETTINGS).Metric" > <a id="#(SETTINGS).Metric" >
<strong>SETTINGS.Metric</strong> <strong>SETTINGS.Metric</strong>
</a> </a>

View File

@ -822,6 +822,12 @@ and any spaces before and after the resulting name are removed.</p>
<td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td> <td class="name" nowrap="nowrap"><a href="##(SPAWN)._TranslateRotate">SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)</a></td>
<td class="summary"> <td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(SPAWN).uncontrolled">SPAWN.uncontrolled</a></td>
<td class="summary">
</td> </td>
</tr> </tr>
</table> </table>
@ -2735,9 +2741,6 @@ when nothing was spawned.</p>
<p> Overwrite unit names by default with group name.</p>
</dd> </dd>
</dl> </dl>
<dl class="function"> <dl class="function">
@ -3739,6 +3742,20 @@ True = Continue Scheduler</p>
</li> </li>
</ul> </ul>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(SPAWN).uncontrolled" >
<strong>SPAWN.uncontrolled</strong>
</a>
</dt>
<dd>
</dd> </dd>
</dl> </dl>

View File

@ -436,7 +436,6 @@ ptional) The name of the new static.</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em>#number</em>
<a id="#(SPAWNSTATIC).SpawnIndex" > <a id="#(SPAWNSTATIC).SpawnIndex" >
<strong>SPAWNSTATIC.SpawnIndex</strong> <strong>SPAWNSTATIC.SpawnIndex</strong>
</a> </a>

View File

@ -765,6 +765,7 @@ true if it is lasing</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em></em>
<a id="#(SPOT).ScheduleID" > <a id="#(SPOT).ScheduleID" >
<strong>SPOT.ScheduleID</strong> <strong>SPOT.ScheduleID</strong>
</a> </a>
@ -778,6 +779,7 @@ true if it is lasing</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em></em>
<a id="#(SPOT).SpotIR" > <a id="#(SPOT).SpotIR" >
<strong>SPOT.SpotIR</strong> <strong>SPOT.SpotIR</strong>
</a> </a>
@ -791,6 +793,7 @@ true if it is lasing</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em></em>
<a id="#(SPOT).SpotLaser" > <a id="#(SPOT).SpotLaser" >
<strong>SPOT.SpotLaser</strong> <strong>SPOT.SpotLaser</strong>
</a> </a>
@ -804,6 +807,7 @@ true if it is lasing</p>
<dl class="function"> <dl class="function">
<dt> <dt>
<em></em>
<a id="#(SPOT).Target" > <a id="#(SPOT).Target" >
<strong>SPOT.Target</strong> <strong>SPOT.Target</strong>
</a> </a>

View File

@ -552,7 +552,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
<dl class="function"> <dl class="function">
<dt> <dt>
<em><a href="Core.Cargo.html##(CARGO_GROUP)">Core.Cargo#CARGO_GROUP</a></em> <em><a href="Core.Cargo.html##(CARGO)">Core.Cargo#CARGO</a></em>
<a id="#(FSM_PROCESS).Cargo" > <a id="#(FSM_PROCESS).Cargo" >
<strong>FSM_PROCESS.Cargo</strong> <strong>FSM_PROCESS.Cargo</strong>
</a> </a>
@ -631,7 +631,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
<dl class="function"> <dl class="function">
<dt> <dt>
<em>#number</em> <em></em>
<a id="#(TASK_CARGO).CargoLimit" > <a id="#(TASK_CARGO).CargoLimit" >
<strong>TASK_CARGO.CargoLimit</strong> <strong>TASK_CARGO.CargoLimit</strong>
</a> </a>