- Implemented attack nearest target.

- Implemented attack nearest ground target.
- Implemented attack nearest air target.
- Report all targets.
- Report only ground targets.
- Report only ground targets with radar.
- Report only air targets.
- Sort targest from nearest to furthest.
- Improved menu system.
- Improved detection of ground targets and air targets and reporting.
- Added the task TASK_CAPTURE as part of the reporting framework.
- Improved the detection of targets. Now targets with specific detection methods are correctly detected. f.e. disabling DLINK will now work correctly!

All these fixes are great improvements to the AI_ESCORT framework!
This commit is contained in:
FlightControl
2019-08-10 15:41:34 +02:00
parent fbb32a9e45
commit d6b1018700
7 changed files with 355 additions and 118 deletions

View File

@@ -2560,9 +2560,17 @@ do -- DETECTION_AREAS
local DetectedSet = self:GetDetectedItemSet( DetectedItem )
local ReportSummaryItem
local DetectedZone = self:GetDetectedItemZone( DetectedItem )
local DetectedItemCoordinate = DetectedZone:GetCoordinate()
local DetectedItemCoordText = DetectedItemCoordinate:ToString( AttackGroup, Settings )
--local DetectedZone = self:GetDetectedItemZone( DetectedItem )
local DetectedItemCoordinate = self:GetDetectedItemCoordinate( DetectedItem )
local DetectedAir = DetectedSet:HasAirUnits()
local DetectedAltitude = self:GetDetectedItemCoordinate( DetectedItem )
local DetectedItemCoordText = ""
if DetectedAir > 0 then
DetectedItemCoordText = DetectedItemCoordinate:ToStringA2A( AttackGroup, Settings )
else
DetectedItemCoordText = DetectedItemCoordinate:ToStringA2G( AttackGroup, Settings )
end
local ThreatLevelA2G = self:GetDetectedItemThreatLevel( DetectedItem )
local DetectedItemsCount = DetectedSet:Count()