mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Fixed detection reports
* Detection reports of DETECTION classes now are returned as a REPORT object. So they can be streamed with various delimiters \n or , or other... * If a coordinate needs to be represented by BR or BRAA, then a "source" controllable is required, which is usually the player aircraft. If not given, the coordinate will be returned in MGRS mode!!!
This commit is contained in:
parent
62ab859215
commit
d26a938ba4
@ -838,8 +838,12 @@ do -- COORDINATE
|
|||||||
|
|
||||||
if ModeA2A then
|
if ModeA2A then
|
||||||
if Settings:IsA2A_BRAA() then
|
if Settings:IsA2A_BRAA() then
|
||||||
|
if Controllable then
|
||||||
local Coordinate = Controllable:GetCoordinate()
|
local Coordinate = Controllable:GetCoordinate()
|
||||||
return self:ToStringBRA( Coordinate, Settings )
|
return self:ToStringBRA( Coordinate, Settings )
|
||||||
|
else
|
||||||
|
return self:ToStringMGRS( Settings )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if Settings:IsA2A_BULLS() then
|
if Settings:IsA2A_BULLS() then
|
||||||
local Coalition = Controllable:GetCoalition()
|
local Coalition = Controllable:GetCoalition()
|
||||||
@ -856,8 +860,13 @@ do -- COORDINATE
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
if Settings:IsA2G_BR() then
|
if Settings:IsA2G_BR() then
|
||||||
|
-- If no Controllable is given to calculate the BR from, then MGRS will be used!!!
|
||||||
|
if Controllable then
|
||||||
local Coordinate = Controllable:GetCoordinate()
|
local Coordinate = Controllable:GetCoordinate()
|
||||||
return Controllable and self:ToStringBR( Coordinate, Settings ) or self:ToStringMGRS( Settings )
|
return Controllable and self:ToStringBR( Coordinate, Settings ) or self:ToStringMGRS( Settings )
|
||||||
|
else
|
||||||
|
return self:ToStringMGRS( Settings )
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if Settings:IsA2G_LL_DMS() then
|
if Settings:IsA2G_LL_DMS() then
|
||||||
return self:ToStringLLDMS( Settings )
|
return self:ToStringLLDMS( Settings )
|
||||||
|
|||||||
@ -1944,7 +1944,7 @@ do -- DETECTION_UNITS
|
|||||||
local DetectedItemCoordinate = self:GetDetectedItemCoordinate( Index )
|
local DetectedItemCoordinate = self:GetDetectedItemCoordinate( Index )
|
||||||
local DetectedItemCoordText = DetectedItemCoordinate:ToString( AttackGroup, Settings )
|
local DetectedItemCoordText = DetectedItemCoordinate:ToString( AttackGroup, Settings )
|
||||||
|
|
||||||
local ThreatLevelA2G = self:GetDetectedItemThreatLevel( DetectedItem )
|
local ThreatLevelA2G = self:GetDetectedItemThreatLevel( Index )
|
||||||
|
|
||||||
local Report = REPORT:New()
|
local Report = REPORT:New()
|
||||||
Report:Add(DetectedItemID .. ", " .. DetectedItemCoordText)
|
Report:Add(DetectedItemID .. ", " .. DetectedItemCoordText)
|
||||||
@ -1968,7 +1968,7 @@ do -- DETECTION_UNITS
|
|||||||
local DetectedItem = DetectedItem -- #DETECTION_BASE.DetectedItem
|
local DetectedItem = DetectedItem -- #DETECTION_BASE.DetectedItem
|
||||||
local ReportSummary = self:DetectedItemReportSummary( DetectedItemID, AttackGroup )
|
local ReportSummary = self:DetectedItemReportSummary( DetectedItemID, AttackGroup )
|
||||||
Report:SetTitle( "Detected units:" )
|
Report:SetTitle( "Detected units:" )
|
||||||
Report:Add( ReportSummary )
|
Report:Add( ReportSummary:Text() )
|
||||||
end
|
end
|
||||||
|
|
||||||
local ReportText = Report:Text()
|
local ReportText = Report:Text()
|
||||||
@ -2198,7 +2198,7 @@ do -- DETECTION_TYPES
|
|||||||
local DetectedItem = DetectedItem -- #DETECTION_BASE.DetectedItem
|
local DetectedItem = DetectedItem -- #DETECTION_BASE.DetectedItem
|
||||||
local ReportSummary = self:DetectedItemReportSummary( DetectedItemTypeName, AttackGroup )
|
local ReportSummary = self:DetectedItemReportSummary( DetectedItemTypeName, AttackGroup )
|
||||||
Report:SetTitle( "Detected types:" )
|
Report:SetTitle( "Detected types:" )
|
||||||
Report:Add( ReportSummary )
|
Report:Add( ReportSummary:Text() )
|
||||||
end
|
end
|
||||||
|
|
||||||
local ReportText = Report:Text()
|
local ReportText = Report:Text()
|
||||||
@ -2352,7 +2352,7 @@ do -- DETECTION_AREAS
|
|||||||
local DetectedItem = DetectedItem -- #DETECTION_BASE.DetectedItem
|
local DetectedItem = DetectedItem -- #DETECTION_BASE.DetectedItem
|
||||||
local ReportSummary = self:DetectedItemReportSummary( DetectedItemIndex, AttackGroup )
|
local ReportSummary = self:DetectedItemReportSummary( DetectedItemIndex, AttackGroup )
|
||||||
Report:SetTitle( "Detected areas:" )
|
Report:SetTitle( "Detected areas:" )
|
||||||
Report:Add( ReportSummary )
|
Report:Add( ReportSummary:Text() )
|
||||||
end
|
end
|
||||||
|
|
||||||
local ReportText = Report:Text()
|
local ReportText = Report:Text()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user