diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua index 014422de0..4589d98b6 100644 --- a/Moose Development/Moose/Core/Point.lua +++ b/Moose Development/Moose/Core/Point.lua @@ -338,7 +338,7 @@ do -- COORDINATE -- @return #string function COORDINATE:GetMovingText( Settings ) - return self:GetVelocityText( Settings ) .. self:GetHeadingText( Settings ) + return self:GetVelocityText( Settings ) .. ", " .. self:GetHeadingText( Settings ) end @@ -350,6 +350,7 @@ do -- COORDINATE return { x = TargetCoordinate.x - self.x, y = TargetCoordinate.y - self.y, z = TargetCoordinate.z - self.z } end + --- Get a correction in radians of the real magnetic north of the COORDINATE. -- @param #COORDINATE self -- @return #number CorrectionRadians The correction in radians. diff --git a/Moose Development/Moose/Tasking/Task.lua b/Moose Development/Moose/Tasking/Task.lua index 03e7107f5..4d6108705 100644 --- a/Moose Development/Moose/Tasking/Task.lua +++ b/Moose Development/Moose/Tasking/Task.lua @@ -879,19 +879,20 @@ function TASK:MenuMarkToGroup( TaskGroup ) local TaskInfoIDText = "" --string.format( "%s: ", TaskInfoID ) if type( TaskInfo.TaskInfoText ) == "string" then - Report:Add( TaskInfoIDText .. TaskInfo.TaskInfoText ) - elseif type(TaskInfo) == "table" then + if TaskInfoID == "Targets" then + else + Report:Add( TaskInfoIDText .. TaskInfo.TaskInfoText ) + end + elseif type( TaskInfo ) == "table" then if TaskInfoID == "Coordinates" then - local ToCoordinate = TaskInfo.TaskInfoText -- Core.Point#COORDINATE - Report:Add( TaskInfoIDText .. ToCoordinate:ToString() ) + --local ToCoordinate = TaskInfo.TaskInfoText -- Core.Point#COORDINATE + --Report:Add( TaskInfoIDText .. ToCoordinate:ToString() ) else end end end - self:E("ok5") - local Coordinate = self:GetInfo( "Coordinates" ) -- Core.Point#COORDINATE local Velocity = self.TargetSetUnit:GetVelocity() @@ -1564,6 +1565,8 @@ function TASK:ReportDetails( ReportGroup ) -- Determine the status of the Task. local Status = "<" .. self:GetState() .. ">" + Report:Add( "Task: " .. Name .. " - " .. Status .. " - Detailed Report" ) + -- Loop each Unit active in the Task, and find Player Names. local PlayerNames = self:GetPlayerNames() @@ -1572,10 +1575,11 @@ function TASK:ReportDetails( ReportGroup ) PlayerReport:Add( "Group " .. PlayerGroup:GetCallsign() .. ": " .. PlayerName ) end local Players = PlayerReport:Text() - - Report:Add( "Task: " .. Name .. " - " .. Status .. " - Detailed Report" ) - Report:Add( " - Players:" ) - Report:AddIndent( Players ) + + if Players ~= "" then + Report:Add( " - Players assigned:" ) + Report:AddIndent( Players ) + end for TaskInfoID, TaskInfo in pairs( self.TaskInfo, function( t, a, b ) return t[a].TaskInfoOrder < t[b].TaskInfoOrder end ) do @@ -1585,17 +1589,24 @@ function TASK:ReportDetails( ReportGroup ) Report:Add( TaskInfoIDText .. TaskInfo.TaskInfoText ) elseif type(TaskInfo) == "table" then if TaskInfoID == "Coordinates" then - local FromCoordinate = ReportGroup:GetUnit(1):GetCoordinate() local ToCoordinate = TaskInfo.TaskInfoText -- Core.Point#COORDINATE - Report:Add( TaskInfoIDText ) - Report:AddIndent( ToCoordinate:ToStringBRA( FromCoordinate ) .. ", " .. TaskInfo.TaskInfoText:ToStringAspect( FromCoordinate ) ) - Report:AddIndent( ToCoordinate:ToStringBULLS( ReportGroup:GetCoalition() ) ) + Report:Add( TaskInfoIDText .. ToCoordinate:ToString() ) else end end end + + local Coordinate = self:GetInfo( "Coordinates" ) -- Core.Point#COORDINATE + local Velocity = self.TargetSetUnit:GetVelocity() + local Heading = self.TargetSetUnit:GetHeading() + + Coordinate:SetHeading( Heading ) + Coordinate:SetVelocity( Velocity ) + + Report:Add( "Targets are" .. Coordinate:GetMovingText() .. "." ) + return Report:Text() end