mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
- 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:
@@ -2065,31 +2065,32 @@ do -- COORDINATE
|
||||
-- @return #string The coordinate Text in the configured coordinate system.
|
||||
function COORDINATE:ToString( Controllable, Settings, Task )
|
||||
|
||||
self:F2( { Controllable = Controllable and Controllable:GetName() } )
|
||||
self:E( { Controllable = Controllable and Controllable:GetName() } )
|
||||
|
||||
local Settings = Settings or ( Controllable and _DATABASE:GetPlayerSettings( Controllable:GetPlayerName() ) ) or _SETTINGS
|
||||
|
||||
local ModeA2A = false
|
||||
self:E('A2A false')
|
||||
local ModeA2A = nil
|
||||
|
||||
if Task then
|
||||
self:E('Task ' .. Task.ClassName )
|
||||
if Task:IsInstanceOf( TASK_A2A ) then
|
||||
ModeA2A = true
|
||||
self:E('A2A true')
|
||||
else
|
||||
if Task:IsInstanceOf( TASK_A2G ) then
|
||||
ModeA2A = false
|
||||
else
|
||||
if Task:IsInstanceOf( TASK_CARGO ) then
|
||||
ModeA2A = false
|
||||
else
|
||||
ModeA2A = false
|
||||
end
|
||||
if Task:IsInstanceOf( TASK_CAPTURE_ZONE ) then
|
||||
ModeA2A = false
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
local IsAir = Controllable and Controllable:IsAirPlane() or false
|
||||
end
|
||||
|
||||
|
||||
if ModeA2A == nil then
|
||||
local IsAir = Controllable and ( Controllable:IsAirPlane() or Controllable:IsHelicopter() ) or false
|
||||
if IsAir then
|
||||
ModeA2A = true
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user