mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Target marking of all tasks in a mission.
Fixed bug with SetAcceptRange.
This commit is contained in:
parent
27159c4234
commit
64b6f52a2d
@ -612,7 +612,7 @@ do -- DETECTION_BASE
|
||||
-- end
|
||||
-- end
|
||||
|
||||
if self.AcceptRange and Distance > self.AcceptRange then
|
||||
if self.AcceptRange and Distance * 1000 > self.AcceptRange then
|
||||
DetectionAccepted = false
|
||||
end
|
||||
|
||||
|
||||
@ -511,6 +511,7 @@ function MISSION:GetMenu( TaskGroup ) -- R2.1 -- Changed Menu Structure
|
||||
|
||||
GroupMenu.BriefingMenu = GroupMenu.BriefingMenu or MENU_GROUP_COMMAND:New( TaskGroup, "Mission Briefing", self.MissionMenu, self.MenuReportBriefing, self, TaskGroup )
|
||||
|
||||
GroupMenu.MarkTasks = GroupMenu.MarkTasks or MENU_GROUP_COMMAND:New( TaskGroup, "Mark Task Locations on Map", self.MissionMenu, self.MarkTargetLocations, self, TaskGroup )
|
||||
GroupMenu.TaskReportsMenu = GroupMenu.TaskReportsMenu or MENU_GROUP:New( TaskGroup, "Task Reports", self.MissionMenu )
|
||||
GroupMenu.ReportTasksMenu = GroupMenu.ReportTasksMenu or MENU_GROUP_COMMAND:New( TaskGroup, "Report Tasks", GroupMenu.TaskReportsMenu, self.MenuReportTasksSummary, self, TaskGroup )
|
||||
GroupMenu.ReportPlannedTasksMenu = GroupMenu.ReportPlannedTasksMenu or MENU_GROUP_COMMAND:New( TaskGroup, "Report Planned Tasks", GroupMenu.TaskReportsMenu, self.MenuReportTasksPerStatus, self, TaskGroup, "Planned" )
|
||||
@ -858,6 +859,32 @@ function MISSION:ReportPlayersProgress( ReportGroup )
|
||||
end
|
||||
|
||||
|
||||
--- Mark all the target locations on the Map.
|
||||
-- @param #MISSION self
|
||||
-- @param Wrapper.Group#GROUP ReportGroup
|
||||
-- @return #string
|
||||
function MISSION:MarkTargetLocations( ReportGroup )
|
||||
|
||||
local Report = REPORT:New()
|
||||
|
||||
-- List the name of the mission.
|
||||
local Name = self:GetName()
|
||||
|
||||
-- Determine the status of the mission.
|
||||
local Status = "<" .. self:GetState() .. ">"
|
||||
|
||||
Report:Add( string.format( '%s - %s - All Tasks are marked on the map. Select a Task from the Mission Menu and Join the Task!!!', Name, Status ) )
|
||||
|
||||
-- Determine how many tasks are remaining.
|
||||
for TaskID, Task in UTILS.spairs( self:GetTasks(), function( t, a, b ) return t[a]:ReportOrder( ReportGroup ) < t[b]:ReportOrder( ReportGroup ) end ) do
|
||||
local Task = Task -- Tasking.Task#TASK
|
||||
Task:MenuMarkToGroup( ReportGroup )
|
||||
end
|
||||
|
||||
return Report:Text()
|
||||
end
|
||||
|
||||
|
||||
--- Create a summary report of the Mission (one line).
|
||||
-- @param #MISSION self
|
||||
-- @param Wrapper.Group#GROUP ReportGroup
|
||||
@ -964,6 +991,17 @@ function MISSION:MenuReportBriefing( ReportGroup )
|
||||
end
|
||||
|
||||
|
||||
--- Mark all the targets of the Mission on the Map.
|
||||
-- @param #MISSION self
|
||||
-- @param Wrapper.Group#GROUP ReportGroup
|
||||
function MISSION:MenuMarkTargetLocations( ReportGroup )
|
||||
|
||||
local Report = self:MarkTargetLocations( ReportGroup )
|
||||
|
||||
self:GetCommandCenter():MessageTypeToGroup( Report, ReportGroup, MESSAGE.Type.Overview )
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- Report the task summary.
|
||||
-- @param #MISSION self
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user