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:
@@ -2624,6 +2624,23 @@ do -- SET_UNIT
|
||||
return GroundUnitCount
|
||||
end
|
||||
|
||||
--- Returns if the @{Set} has air targets.
|
||||
-- @param #SET_UNIT self
|
||||
-- @return #number The amount of air targets in the Set.
|
||||
function SET_UNIT:HasAirUnits()
|
||||
self:F2()
|
||||
|
||||
local AirUnitCount = 0
|
||||
for UnitID, UnitData in pairs( self:GetSet() ) do
|
||||
local UnitTest = UnitData -- Wrapper.Unit#UNIT
|
||||
if UnitTest:IsAir() then
|
||||
AirUnitCount = AirUnitCount + 1
|
||||
end
|
||||
end
|
||||
|
||||
return AirUnitCount
|
||||
end
|
||||
|
||||
--- Returns if the @{Set} has friendly ground units.
|
||||
-- @param #SET_UNIT self
|
||||
-- @return #number The amount of ground targets in the Set.
|
||||
|
||||
Reference in New Issue
Block a user