mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
First version of AI_A2G_DISPATCHER ...
- Created a new AI_AIR class. AI_A2A and AI_A2G inherit from AI_AIR. - Created a new AI_A2G_DISPATCHER class. - Created a new AI_A2G_ENGAGE class, that implements the SEAD, CAS and BAI actions. - The AI_A2G_DISPATCHER implements now: * SEAD, CAS and BAI attacks from airbases. * AddDefenseCoordinate() to set a defense coordinate. * RemoveDefenseCoordinate() to remove a defense coordinate. * SetDefenseReactivenessHigh() for high reactiveness. * SetDefenseReactivenessMedium() for medium reactiveness. * SetDefenseReactivenessLow() for low reactiveness. * Overhead for ground attacks. * Grouping for ground attacks. * Evaluates task type based on enemy group composition. - Tested AI_A2A_DISPATCHER for backward compatibility. - Implemented spawning of airplanes in AI_A2A_DISPATCHER: * SetSquadronVisible() method to make the squadron visible at the airport.
This commit is contained in:
@@ -712,7 +712,7 @@ function CONTROLLABLE:TaskAttackUnit( AttackUnit, GroupAttack, WeaponExpend, Att
|
||||
groupAttack = GroupAttack or false,
|
||||
visible = Visible or false,
|
||||
expend = WeaponExpend or "Auto",
|
||||
directionEnabled = Direction and true or false,
|
||||
directionEnabled = Direction and true or nil,
|
||||
direction = Direction,
|
||||
altitudeEnabled = Altitude and true or false,
|
||||
altitude = Altitude or 30,
|
||||
|
||||
@@ -620,6 +620,24 @@ function UNIT:GetLife0()
|
||||
return 0
|
||||
end
|
||||
|
||||
--- Returns the category of the unit, which is different than the generic category types of objects.
|
||||
-- @param #UNIT self
|
||||
-- @return DCS#Unit.Category
|
||||
function UNIT:GetUnitCategory()
|
||||
self:F3( self.UnitName )
|
||||
|
||||
local DCSUnit = self:GetDCSObject()
|
||||
if DCSUnit then
|
||||
local UnitCategory = DCSUnit:getDesc().category
|
||||
self:T3( UnitCategory )
|
||||
|
||||
return UnitCategory
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
--- Returns the category name of the #UNIT.
|
||||
-- @param #UNIT self
|
||||
-- @return #string Category name = Helicopter, Airplane, Ground Unit, Ship
|
||||
@@ -645,6 +663,8 @@ function UNIT:GetCategoryName()
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--- Returns the Unit's A2G threat level on a scale from 1 to 10 ...
|
||||
-- The following threat levels are foreseen:
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user