mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Progress
This commit is contained in:
@@ -1302,6 +1302,32 @@ do -- DETECTION_BASE
|
||||
|
||||
return nil
|
||||
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 Coordinate
|
||||
function DETECTION_BASE:GetDetectedItemCoordinate( Index )
|
||||
|
||||
-- If the Zone is set, return the coordinate of the Zone.
|
||||
local DetectedZone = self:GetDetectedItemZone( Index )
|
||||
if DetectedZone then
|
||||
return DetectedZone:GetCoordinate()
|
||||
end
|
||||
|
||||
-- If no Zone is set, return the coordinate of the first unit in the Set
|
||||
local DetectedItemSet = self:GetDetectedSet( Index )
|
||||
local FirstUnit = DetectedItemSet:GetFirst()
|
||||
if FirstUnit then
|
||||
return FirstUnit:GetCoordinate()
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
do -- Zones
|
||||
|
||||
@@ -1309,13 +1335,15 @@ do -- DETECTION_BASE
|
||||
-- @param #DETECTION_BASE self
|
||||
-- @param #number Index
|
||||
-- @return Core.Zone#ZONE_UNIT DetectedZone
|
||||
function DETECTION_BASE:GetDetectedZone( Index )
|
||||
function DETECTION_BASE:GetDetectedItemZone( Index )
|
||||
|
||||
local DetectedZone = self.DetectedItems[Index].Zone
|
||||
if DetectedZone then
|
||||
return DetectedZone
|
||||
end
|
||||
|
||||
local Detected
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
@@ -1977,7 +2005,7 @@ do -- DETECTION_AREAS
|
||||
local DetectedSet = self:GetDetectedSet( Index )
|
||||
local ReportSummaryItem
|
||||
|
||||
local DetectedZone = self:GetDetectedZone( Index )
|
||||
local DetectedZone = self:GetDetectedItemZone( Index )
|
||||
local DetectedItemCoordinate = DetectedZone:GetCoordinate()
|
||||
local DetectedItemCoordText = DetectedItemCoordinate:ToString()
|
||||
|
||||
@@ -2007,7 +2035,7 @@ do -- DETECTION_AREAS
|
||||
local DetectedSet = self:GetDetectedSet( Index )
|
||||
local ReportSummaryItem
|
||||
|
||||
local DetectedZone = self:GetDetectedZone( Index )
|
||||
local DetectedZone = self:GetDetectedItemZone( Index )
|
||||
local DetectedItemCoordinate = DetectedZone:GetCoordinate()
|
||||
local DetectedItemCoordText = DetectedItemCoordinate:ToString()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user